# HG changeset patch # User athos # Date 1111578700 0 # Node ID 60708e1475aec2bbca94f6274169d22766287a3a # Parent 925002e098e7b13a61d0a66dfc342e1d30030f01 Completions. diff -r 925002e098e7 -r 60708e1475ae src/work/athos/lp/lp_base.cc --- a/src/work/athos/lp/lp_base.cc Wed Mar 23 10:35:36 2005 +0000 +++ b/src/work/athos/lp/lp_base.cc Wed Mar 23 11:51:40 2005 +0000 @@ -1,4 +1,19 @@ -// -*- c++ -*- +/* -*- C++ -*- + * src/lemon/maps.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_BASE_CC #define LEMON_LP_BASE_CC diff -r 925002e098e7 -r 60708e1475ae src/work/athos/lp/lp_base.h --- a/src/work/athos/lp/lp_base.h Wed Mar 23 10:35:36 2005 +0000 +++ b/src/work/athos/lp/lp_base.h Wed Mar 23 11:51:40 2005 +0000 @@ -1,4 +1,19 @@ -// -*- c++ -*- +/* -*- C++ -*- + * src/lemon/maps.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_BASE_H #define LEMON_LP_BASE_H @@ -6,7 +21,15 @@ ///\brief The interface of the LP solver interface. namespace lemon { class LpSolverBase { - protected: + public: + + //UNCATEGORIZED + + /// \e + typedef double Value; + /// \e + static const Value INF; + protected: //MATRIX MANIPULATING FUNCTIONS @@ -17,14 +40,37 @@ /// \e /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) virtual void _setRowCoeffs(int i, - int * &indices, - double * &doubles ) = 0; + int const * indices, + Value const * values ) = 0; /// \e /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) virtual void _setColCoeffs(int i, - int * &indices, - double * &doubles ) = 0; + int const * indices, + Value const * values ) = 0; + /// \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 -INF. + virtual void _setColLowerBound(int i, Value value) = 0; + /// \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 INF. + virtual void _setColUpperBound(int i, Value value) = 0; + /// \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 -INF. + virtual void _setRowLowerBound(int i, Value value) = 0; + /// \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 INF. + virtual void _setRowUpperBound(int i, Value value) = 0; + + /// \e + virtual void _setObjCoeff(int i, Value obj_coef) = 0; } } //namespace lemon