/*****************************************************************//**
 * \file   BranchingStrategy.h
 * \brief  Reperesents the interface of branching strategy with a virtual pure algorithm to override by inherent classes depending on the choosed branching strategy.
 * 
 * \author talmefta
 * \date   May 2022
 *********************************************************************/
#ifndef BRANCHINGSTRATEGY_H
#define BRANCHINGSTRATEGY_H

#include "Header.h"
#include "Node.h"

/**
 * \class BranchingStrategy
 * \brief Interface of Strategy design pattern dealing with the branching strategy.
 */

template<class RestrictedMasterProblem, class PricingSubProblem, class ColumnGeneration, class ConstraintType>
class BranchingStrategy
{
public:
    /**
     * Virtual destructor.
     * 
     */
    virtual ~BranchingStrategy() {}

    /**
     * Branches a node into different children. This method has to be implemented by inherent classes to define how to branch the node.
     * 
     * \param node: const Node<class RestrictedMasterProblem, class PricingSubProblem, class ColumnGeneration>& 
     * \return list<Node<RestrictedMasterProblem, PricingSubProblem,
        ColumnGeneration, ConstraintType>>
     */
    virtual list<Node<RestrictedMasterProblem, PricingSubProblem,
        ColumnGeneration, ConstraintType>> branch(Node<RestrictedMasterProblem, PricingSubProblem,
            ColumnGeneration, ConstraintType>& node) const = 0;
};

#endif //BRANCHINGSTRATEGY_H
