1.1 --- a/src/work/athos/lp/lp_base.h Wed Mar 23 10:35:36 2005 +0000
1.2 +++ b/src/work/athos/lp/lp_base.h Wed Mar 23 11:51:40 2005 +0000
1.3 @@ -1,4 +1,19 @@
1.4 -// -*- c++ -*-
1.5 +/* -*- C++ -*-
1.6 + * src/lemon/maps.h - Part of LEMON, a generic C++ optimization library
1.7 + *
1.8 + * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.9 + * (Egervary Combinatorial Optimization Research Group, EGRES).
1.10 + *
1.11 + * Permission to use, modify and distribute this software is granted
1.12 + * provided that this copyright notice appears in all copies. For
1.13 + * precise terms see the accompanying LICENSE file.
1.14 + *
1.15 + * This software is provided "AS IS" with no warranty of any kind,
1.16 + * express or implied, and with no claim as to its suitability for any
1.17 + * purpose.
1.18 + *
1.19 + */
1.20 +
1.21 #ifndef LEMON_LP_BASE_H
1.22 #define LEMON_LP_BASE_H
1.23
1.24 @@ -6,7 +21,15 @@
1.25 ///\brief The interface of the LP solver interface.
1.26 namespace lemon {
1.27 class LpSolverBase {
1.28 - protected:
1.29 + public:
1.30 +
1.31 + //UNCATEGORIZED
1.32 +
1.33 + /// \e
1.34 + typedef double Value;
1.35 + /// \e
1.36 + static const Value INF;
1.37 + protected:
1.38
1.39 //MATRIX MANIPULATING FUNCTIONS
1.40
1.41 @@ -17,14 +40,37 @@
1.42 /// \e
1.43 /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
1.44 virtual void _setRowCoeffs(int i,
1.45 - int * &indices,
1.46 - double * &doubles ) = 0;
1.47 + int const * indices,
1.48 + Value const * values ) = 0;
1.49 /// \e
1.50 /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
1.51 virtual void _setColCoeffs(int i,
1.52 - int * &indices,
1.53 - double * &doubles ) = 0;
1.54 + int const * indices,
1.55 + Value const * values ) = 0;
1.56
1.57 + /// \e
1.58 + /// The lower bound of a variable (column) have to be given by an
1.59 + /// extended number of type Value, i.e. a finite number of type
1.60 + /// Value or -INF.
1.61 + virtual void _setColLowerBound(int i, Value value) = 0;
1.62 + /// \e
1.63 + /// The upper bound of a variable (column) have to be given by an
1.64 + /// extended number of type Value, i.e. a finite number of type
1.65 + /// Value or INF.
1.66 + virtual void _setColUpperBound(int i, Value value) = 0;
1.67 + /// \e
1.68 + /// The lower bound of a linear expression (row) have to be given by an
1.69 + /// extended number of type Value, i.e. a finite number of type
1.70 + /// Value or -INF.
1.71 + virtual void _setRowLowerBound(int i, Value value) = 0;
1.72 + /// \e
1.73 + /// The upper bound of a linear expression (row) have to be given by an
1.74 + /// extended number of type Value, i.e. a finite number of type
1.75 + /// Value or INF.
1.76 + virtual void _setRowUpperBound(int i, Value value) = 0;
1.77 +
1.78 + /// \e
1.79 + virtual void _setObjCoeff(int i, Value obj_coef) = 0;
1.80 }
1.81
1.82 } //namespace lemon