lemon/lp_skeleton.h
changeset 2388 c6d537888fe5
parent 2364 3a5e67bd42d2
child 2391 14a343be7a5a
equal deleted inserted replaced
12:0645d04be47b 13:adea1e3a4931
    42     /// \e
    42     /// \e
    43     virtual void _eraseCol(int i);
    43     virtual void _eraseCol(int i);
    44     /// \e
    44     /// \e
    45     virtual void _eraseRow(int i);
    45     virtual void _eraseRow(int i);
    46     /// \e
    46     /// \e
    47     virtual void _getColName(int col, std::string & name);
    47     virtual void _getColName(int col, std::string & name) const;
    48     /// \e
    48     /// \e
    49     virtual void _setColName(int col, const std::string & name);
    49     virtual void _setColName(int col, const std::string & name);
       
    50     /// \e
       
    51     virtual int _colByName(const std::string& name) const;
    50 
    52 
    51     /// \e
    53     /// \e
    52     virtual void _setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e);
    54     virtual void _setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e);
    53     /// \e
    55     /// \e
    54     virtual void _getRowCoeffs(int i, RowIterator b);
    56     virtual void _getRowCoeffs(int i, RowIterator b) const;
    55     /// \e
    57     /// \e
    56     virtual void _setColCoeffs(int i, ConstColIterator b, ConstColIterator e);
    58     virtual void _setColCoeffs(int i, ConstColIterator b, ConstColIterator e);
    57     /// \e
    59     /// \e
    58     virtual void _getColCoeffs(int i, ColIterator b);
    60     virtual void _getColCoeffs(int i, ColIterator b) const;
    59     
    61     
    60     /// Set one element of the coefficient matrix
    62     /// Set one element of the coefficient matrix
    61     virtual void _setCoeff(int row, int col, Value value);
    63     virtual void _setCoeff(int row, int col, Value value);
    62 
    64 
    63     /// Get one element of the coefficient matrix
    65     /// Get one element of the coefficient matrix
    64     virtual Value _getCoeff(int row, int col);
    66     virtual Value _getCoeff(int row, int col) const;
    65 
    67 
    66     /// The lower bound of a variable (column) have to be given by an 
    68     /// The lower bound of a variable (column) have to be given by an 
    67     /// extended number of type Value, i.e. a finite number of type 
    69     /// extended number of type Value, i.e. a finite number of type 
    68     /// Value or -\ref INF.
    70     /// Value or -\ref INF.
    69     virtual void _setColLowerBound(int i, Value value);
    71     virtual void _setColLowerBound(int i, Value value);
    70     /// \e
    72     /// \e
    71 
    73 
    72     /// The lower bound of a variable (column) is an 
    74     /// The lower bound of a variable (column) is an 
    73     /// extended number of type Value, i.e. a finite number of type 
    75     /// extended number of type Value, i.e. a finite number of type 
    74     /// Value or -\ref INF.
    76     /// Value or -\ref INF.
    75     virtual Value _getColLowerBound(int i);
    77     virtual Value _getColLowerBound(int i) const;
    76 
    78 
    77     /// The upper bound of a variable (column) have to be given by an 
    79     /// The upper bound of a variable (column) have to be given by an 
    78     /// extended number of type Value, i.e. a finite number of type 
    80     /// extended number of type Value, i.e. a finite number of type 
    79     /// Value or \ref INF.
    81     /// Value or \ref INF.
    80     virtual void _setColUpperBound(int i, Value value);
    82     virtual void _setColUpperBound(int i, Value value);
    81     /// \e
    83     /// \e
    82 
    84 
    83     /// The upper bound of a variable (column) is an 
    85     /// The upper bound of a variable (column) is an 
    84     /// extended number of type Value, i.e. a finite number of type 
    86     /// extended number of type Value, i.e. a finite number of type 
    85     /// Value or \ref INF.
    87     /// Value or \ref INF.
    86     virtual Value _getColUpperBound(int i);
    88     virtual Value _getColUpperBound(int i) const;
    87 
    89 
    88 //     /// The lower bound of a linear expression (row) have to be given by an 
    90 //     /// The lower bound of a linear expression (row) have to be given by an 
    89 //     /// extended number of type Value, i.e. a finite number of type 
    91 //     /// extended number of type Value, i.e. a finite number of type 
    90 //     /// Value or -\ref INF.
    92 //     /// Value or -\ref INF.
    91 //     virtual void _setRowLowerBound(int i, Value value);
    93 //     virtual void _setRowLowerBound(int i, Value value);
   106 
   108 
   107     /// The lower and the upper bound of
   109     /// The lower and the upper bound of
   108     /// a constraint (row) are  
   110     /// a constraint (row) are  
   109     /// extended numbers of type Value, i.e.  finite numbers of type 
   111     /// extended numbers of type Value, i.e.  finite numbers of type 
   110     /// Value, -\ref INF or \ref INF. 
   112     /// Value, -\ref INF or \ref INF. 
   111     virtual void _getRowBounds(int i, Value &lb, Value &ub);
   113     virtual void _getRowBounds(int i, Value &lb, Value &ub) const;
   112     /// \e
   114     /// \e
   113 
   115 
   114 
   116 
   115     /// \e
   117     /// \e
   116     virtual void _clearObj();
   118     virtual void _clearObj();
   117     /// \e
   119     /// \e
   118     virtual void _setObjCoeff(int i, Value obj_coef);
   120     virtual void _setObjCoeff(int i, Value obj_coef);
   119 
   121 
   120     /// \e
   122     /// \e
   121     virtual Value _getObjCoeff(int i);
   123     virtual Value _getObjCoeff(int i) const;
   122 
   124 
   123     ///\e
   125     ///\e
   124     
   126     
   125     ///\bug Wrong interface
   127     ///\bug Wrong interface
   126     ///
   128     ///
   128 
   130 
   129     ///\e
   131     ///\e
   130 
   132 
   131     ///\bug Wrong interface
   133     ///\bug Wrong interface
   132     ///
   134     ///
   133     virtual Value _getPrimal(int i);
   135     virtual Value _getPrimal(int i) const;
   134 
   136 
   135     ///\e
   137     ///\e
   136 
   138 
   137     ///\bug Wrong interface
   139     ///\bug Wrong interface
   138     ///
   140     ///
   139     virtual Value _getDual(int i);
   141     virtual Value _getDual(int i) const;
   140 
   142 
   141     ///\e
   143     ///\e
   142 
   144 
   143     ///\bug Wrong interface
   145     ///\bug Wrong interface
   144     ///
   146     ///
   145     virtual Value _getPrimalValue();
   147     virtual Value _getPrimalValue() const;
   146 
   148 
   147     ///\e
   149     ///\e
   148 
   150 
   149     ///\bug Wrong interface
   151     ///\bug Wrong interface
   150     ///
   152     ///
   151     virtual SolutionStatus _getPrimalStatus();
   153     virtual SolutionStatus _getPrimalStatus() const;
   152 
   154 
   153     ////e
   155     ////e
   154     virtual SolutionStatus _getDualStatus();
   156     virtual SolutionStatus _getDualStatus() const;
   155 
   157 
   156 
   158 
   157     ///\e
   159     ///\e
   158     virtual ProblemTypes _getProblemType();
   160     virtual ProblemTypes _getProblemType() const;
   159 
   161 
   160     ///\e
   162     ///\e
   161     virtual void _setMax();
   163     virtual void _setMax();
   162     ///\e
   164     ///\e
   163     virtual void _setMin();
   165     virtual void _setMin();
   164 
   166 
   165     ///\e
   167     ///\e
   166     virtual bool _isMax();
   168     virtual bool _isMax() const;
   167 
   169 
   168 
   170 
   169 
   171 
   170     ///\e
   172     ///\e
   171     virtual bool _isBasicCol(int i);
   173     virtual bool _isBasicCol(int i) const;
   172 
   174 
   173     
   175     
   174 
   176 
   175   public:
   177   public:
   176     LpSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}
   178     LpSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}