athos@1247: /* -*- C++ -*- athos@1247: * src/lemon/maps.h - Part of LEMON, a generic C++ optimization library athos@1247: * athos@1247: * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport athos@1247: * (Egervary Combinatorial Optimization Research Group, EGRES). athos@1247: * athos@1247: * Permission to use, modify and distribute this software is granted athos@1247: * provided that this copyright notice appears in all copies. For athos@1247: * precise terms see the accompanying LICENSE file. athos@1247: * athos@1247: * This software is provided "AS IS" with no warranty of any kind, athos@1247: * express or implied, and with no claim as to its suitability for any athos@1247: * purpose. athos@1247: * athos@1247: */ athos@1247: athos@1246: #ifndef LEMON_LP_BASE_H athos@1246: #define LEMON_LP_BASE_H athos@1246: athos@1246: ///\file athos@1246: ///\brief The interface of the LP solver interface. athos@1246: namespace lemon { athos@1246: class LpSolverBase { athos@1247: public: athos@1247: athos@1247: //UNCATEGORIZED athos@1247: athos@1247: /// \e athos@1247: typedef double Value; athos@1247: /// \e athos@1247: static const Value INF; athos@1247: protected: athos@1246: athos@1246: //MATRIX MANIPULATING FUNCTIONS athos@1246: athos@1246: /// \e athos@1246: virtual int _addCol() = 0; athos@1246: /// \e athos@1246: virtual int _addRow() = 0; athos@1246: /// \e athos@1246: /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) athos@1246: virtual void _setRowCoeffs(int i, athos@1251: int length, athos@1247: int const * indices, athos@1247: Value const * values ) = 0; athos@1246: /// \e athos@1246: /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) athos@1246: virtual void _setColCoeffs(int i, athos@1251: int length, athos@1247: int const * indices, athos@1247: Value const * values ) = 0; athos@1246: athos@1247: /// \e athos@1247: /// The lower bound of a variable (column) have to be given by an athos@1247: /// extended number of type Value, i.e. a finite number of type athos@1247: /// Value or -INF. athos@1247: virtual void _setColLowerBound(int i, Value value) = 0; athos@1247: /// \e athos@1247: /// The upper bound of a variable (column) have to be given by an athos@1247: /// extended number of type Value, i.e. a finite number of type athos@1247: /// Value or INF. athos@1247: virtual void _setColUpperBound(int i, Value value) = 0; athos@1247: /// \e athos@1247: /// The lower bound of a linear expression (row) have to be given by an athos@1247: /// extended number of type Value, i.e. a finite number of type athos@1247: /// Value or -INF. athos@1247: virtual void _setRowLowerBound(int i, Value value) = 0; athos@1247: /// \e athos@1247: /// The upper bound of a linear expression (row) have to be given by an athos@1247: /// extended number of type Value, i.e. a finite number of type athos@1247: /// Value or INF. athos@1247: virtual void _setRowUpperBound(int i, Value value) = 0; athos@1247: athos@1247: /// \e athos@1247: virtual void _setObjCoeff(int i, Value obj_coef) = 0; athos@1248: }; athos@1246: athos@1246: } //namespace lemon athos@1246: athos@1246: #endif //LEMON_LP_BASE_H