/*****************************************************************//**
 * \file   Constraint.h
 * \brief  A generic constraint interface to store the specific constraint wheither it is a branching constraint or a cut constraint.
 *
 * \author Matteo Petris
 * \date   February 2023
 *********************************************************************/
#ifndef EXCHANGENUMBERBRANCHCONSTRAINT_H
#define EXCHANGENUMBERBRANCHCONSTRAINT_H

#include "Constraint.h"

template<class Type>
class ExchangeNumberConstraint: public Constraint<Type> {

protected:


public:
	/**
	 * Constructor by default.
	 *
	 */
	ExchangeNumberConstraint() : Constraint<Type>() {
	}


	/**
	 * Constructor with the left hand side, the right hand side and the operator of the constraint.
	 *
	 * \param variables_indexes: vector<int>&
	 * \param rhs: double
	 * \param _operator: const string&
	 */
	ExchangeNumberConstraint(double rhs, const string& _operator, const string& name = "") :
		Constraint<Type>(rhs, _operator, name) {
	}

	/**
	 * Destructor.
	 *
	 */
	virtual ~ExchangeNumberConstraint() {
	}

	/**
	 * Get method of items.
	 *
	 * \return items: const pair<int, int>&
	 */
	void set_name(const pair<int, int>& new_items) const {
		this->items = new_items;
	}

	string to_string() const {
		stringstream mystring;
		mystring << this->item << " ";
		mystring << Constraint<Type>::to_string();
		return mystring.str();
	}

	/**
	*  \brief	 Get a string for debug output.
	*  \param    out : ostream
	*  \param    constraint : const ArcBranchConstraint<Type>&
	*  \return   The stream with the message ID added : ostream
	*/
	friend ostream& operator<<(ostream& out, const ExchangeNumberConstraint<Type>& constraint) {
		out << constraint.to_string();
		return out;
	}
};
#endif //EXCHANGENUMBERBRANCHCONSTRAINT_H
