COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/lemon/lp_skeleton.h @ 1405:3626c7f10f14

Last change on this file since 1405:3626c7f10f14 was 1405:3626c7f10f14, checked in by athos, 19 years ago

Deleted _setRowLowerBound() and _setRowUpperBound() functions. Cplex worked (now it does not because of _getPrimalStatus()).

File size: 3.4 KB
RevLine 
[1254]1/* -*- C++ -*-
[1313]2 * src/lemon/lp_skeleton.h
[1254]3 * - Part of LEMON, a generic C++ optimization library
4 *
5 * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
[1359]6 * (Egervary Research Group on Combinatorial Optimization, EGRES).
[1254]7 *
8 * Permission to use, modify and distribute this software is granted
9 * provided that this copyright notice appears in all copies. For
10 * precise terms see the accompanying LICENSE file.
11 *
12 * This software is provided "AS IS" with no warranty of any kind,
13 * express or implied, and with no claim as to its suitability for any
14 * purpose.
15 *
16 */
17
[1313]18#ifndef LEMON_LP_SKELETON
19#define LEMON_LP_SKELETON
[1254]20
[1356]21#include <lemon/lp_base.h>
[1254]22
23///\file
24///\brief A skeleton file to implement LP solver interfaces
25namespace lemon {
26 
27  ///A skeleton class to implement LP solver interfaces
[1313]28  class LpSkeleton :public LpSolverBase {
[1273]29    int col_num,row_num;
30   
[1254]31  protected:
[1364]32    ///\e
33    virtual LpSolverBase &_newLp();
34    ///\e
35    virtual LpSolverBase &_copyLp();
[1294]36    /// \e
[1254]37    virtual int _addCol();
[1294]38    /// \e
[1254]39    virtual int _addRow();
[1294]40    /// \e
41
42    /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
43    ///
[1254]44    virtual void _setRowCoeffs(int i,
45                               int length,
46                               int  const * indices,
47                               Value  const * values );
[1294]48    /// \e
49
50    /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
51    ///
[1254]52    virtual void _setColCoeffs(int i,
53                               int length,
54                               int  const * indices,
[1294]55                               Value  const * values );
56   
57    /// \e
58
59    /// The lower bound of a variable (column) have to be given by an
60    /// extended number of type Value, i.e. a finite number of type
61    /// Value or -\ref INF.
[1254]62    virtual void _setColLowerBound(int i, Value value);
[1294]63    /// \e
64
65    /// The upper bound of a variable (column) have to be given by an
66    /// extended number of type Value, i.e. a finite number of type
67    /// Value or \ref INF.
[1254]68    virtual void _setColUpperBound(int i, Value value);
[1294]69    /// \e
70
[1405]71//     /// The lower bound of a linear expression (row) have to be given by an
72//     /// extended number of type Value, i.e. a finite number of type
73//     /// Value or -\ref INF.
74//     virtual void _setRowLowerBound(int i, Value value);
75//     /// \e
76
77//     /// The upper bound of a linear expression (row) have to be given by an
78//     /// extended number of type Value, i.e. a finite number of type
79//     /// Value or \ref INF.
80//     virtual void _setRowUpperBound(int i, Value value);
81
82    /// The lower and upper bound of a linear expression (row) have to be
83    /// given by an
[1294]84    /// extended number of type Value, i.e. a finite number of type
[1405]85    /// Value or +/-\ref INF.
[1389]86    virtual void _setRowBounds(int i, Value lb, Value ub);
87    /// \e
88
[1294]89
90    /// \e
[1390]91    virtual void _clearObj();
92    /// \e
[1254]93    virtual void _setObjCoeff(int i, Value obj_coef);
[1294]94
95    ///\e
96   
97    ///\bug Wrong interface
98    ///
[1303]99    virtual SolveExitStatus _solve();
[1294]100
101    ///\e
102
103    ///\bug Wrong interface
104    ///
[1293]105    virtual Value _getPrimal(int i);
[1294]106    ///\e
107
108    ///\bug Wrong interface
109    ///
[1312]110    virtual Value _getPrimalValue();
111    ///\e
112
113    ///\bug Wrong interface
114    ///
115    virtual SolutionStatus _getPrimalStatus();
116
117    ///\e
118    virtual void _setMax();
119    ///\e
120    virtual void _setMin();
121   
[1294]122
[1273]123  public:
[1313]124    LpSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}
[1254]125  }; 
126
127} //namespace lemon
128
[1313]129#endif // LEMON_LP_SKELETON
Note: See TracBrowser for help on using the repository browser.