#pragma once

#include <vector>
#include "gdconfig.hpp"
#include "gdtypes.hpp"

/*!
 * \brief base class for calling single-objective solvers
 */
class BaseSolver {

    public:

        BaseSolver() {
            
        }

        /*!
         * \brief callback function used to solver the weighted sum problems, to be implemented by the user with a solver call
         * \param weight the weight vector to use in the weighted sum
         * \param adj_solutions the list of solution indexes adjacent to the weight vector in the current weight set decomposition 
         * \param solution the cost vector of the solution found
         * \param obj_value the weighted sum of the solution
         */
        virtual bool solve(dichotomy::WeightVec& weight, std::set<size_t> adj_solutions, dichotomy::CostVec& solution, dichotomy::COST& obj_value) = 0;

        /*!
         * \brief callback function notifying if the last solution computed is new or not
         * \param is_new true if the last solution is a new solution, false otherwise
         */
        virtual void isNew(bool is_new) = 0;

        /*!
         * \brief get the number of objectives of the problem
         */
        virtual std::size_t getNObj() = 0;

};