/* -*- C++ -*- * src/lemon/lp_skeleton.h * - Part of LEMON, a generic C++ optimization library * * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Combinatorial Optimization Research Group, EGRES). * * Permission to use, modify and distribute this software is granted * provided that this copyright notice appears in all copies. For * precise terms see the accompanying LICENSE file. * * This software is provided "AS IS" with no warranty of any kind, * express or implied, and with no claim as to its suitability for any * purpose. * */ #ifndef LEMON_LP_SKELETON #define LEMON_LP_SKELETON #include"lp_base.h" ///\file ///\brief A skeleton file to implement LP solver interfaces namespace lemon { ///A skeleton class to implement LP solver interfaces class LpSkeleton :public LpSolverBase { int col_num,row_num; protected: /// \e virtual int _addCol(); /// \e virtual int _addRow(); /// \e /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) /// virtual void _setRowCoeffs(int i, int length, int const * indices, Value const * values ); /// \e /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) /// virtual void _setColCoeffs(int i, int length, int const * indices, Value const * values ); /// \e /// The lower bound of a variable (column) have to be given by an /// extended number of type Value, i.e. a finite number of type /// Value or -\ref INF. virtual void _setColLowerBound(int i, Value value); /// \e /// The upper bound of a variable (column) have to be given by an /// extended number of type Value, i.e. a finite number of type /// Value or \ref INF. virtual void _setColUpperBound(int i, Value value); /// \e /// The lower bound of a linear expression (row) have to be given by an /// extended number of type Value, i.e. a finite number of type /// Value or -\ref INF. virtual void _setRowLowerBound(int i, Value value); /// \e /// The upper bound of a linear expression (row) have to be given by an /// extended number of type Value, i.e. a finite number of type /// Value or \ref INF. virtual void _setRowUpperBound(int i, Value value); /// \e virtual void _setObjCoeff(int i, Value obj_coef); ///\e ///\bug Wrong interface /// virtual SolveExitStatus _solve(); ///\e ///\bug Wrong interface /// virtual Value _getPrimal(int i); ///\e ///\bug Wrong interface /// virtual Value _getPrimalValue(); ///\e ///\bug Wrong interface /// virtual SolutionStatus _getPrimalStatus(); ///\e virtual void _setMax(); ///\e virtual void _setMin(); public: LpSkeleton() : LpSolverBase(), col_num(0), row_num(0) {} }; } //namespace lemon #endif // LEMON_LP_SKELETON