/*
    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.
*/

#ifndef CLUSTERINGBASE_LINK_H
#define CLUSTERINGBASE_LINK_H

#include <boost/smart_ptr.hpp>
#include <set>


namespace ClusteringBase
{
	/**
	Reprezentation of relation (link) between 2 clusters.
	*/
	class Link
	{
	public:
		/**
		C-tor
		*/
		Link(size_t fromID, size_t toID);
		virtual ~Link();

		/**
		Compares id's
		*/
		bool operator < (Link &c);

		// geters 
		size_t GetID() const;
		size_t GetFromID() const;
		size_t GetToID() const;


	private:
		size_t m_ID;
		size_t m_FromID;
		size_t m_ToID;
		static size_t m_LastID;


		//Link(const Link&);// no implementation
		//Link& operator=(const Link&); // no implementation
	};

	typedef boost::shared_ptr<Link> LinkPtr;
	struct lessLinkPtr
	{
		bool operator()(const LinkPtr l1, const LinkPtr l2);
		
	};

	typedef std::set<LinkPtr, lessLinkPtr> LinkSet;
	typedef boost::shared_ptr<LinkSet> LinkSetPtr;


}

#endif //CLUSTERINGBASE_LINK_H

