/*
    Copyright (C) 2012 Bartosz Broda, Jacek Bochenek, Łukasz Biłeńkij, 
    Damian Jaworski, Wojciech Mazur, Dominik Piasecki, Maciej Piasecki, 
    Radosław Ramocki
    
    This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option)
any later version.

    This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. 

    See the LICENSE and COPYING files for more details.
*/

#include "Link.h"

namespace ClusteringBase
{
	size_t Link::m_LastID = 0;

	Link::Link(size_t fromID, size_t toID) 
		: m_ID(m_LastID++),
		m_FromID(fromID),
		m_ToID(toID)

	{
	}


	Link::~Link()
	{

	}

	size_t Link::GetID() const
	{
		return m_ID;
	}

	size_t Link::GetFromID() const
	{
		return m_FromID;
	}
	size_t Link::GetToID() const
	{
		return m_ToID;
	}

	bool Link::operator < (Link &c)
	{
		return GetID() < c.GetID();
	}

	bool lessLinkPtr::operator()(const LinkPtr l1, const LinkPtr l2)
	{
		return (*l1 < *l2);
	}


}

