COIN-OR::LEMON - Graph Library

Changeset 1294:2dec219d9ca2 in lemon-0.x


Ignore:
Timestamp:
04/03/05 12:20:49 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1727
Message:

Documentation of abstract functions is in lp_solver_skeleton.h

Location:
src/work/athos/lp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/lp/lp_base.h

    r1293 r1294  
    362362    _FixId cols;
    363363
    364     /// \e
    365364    virtual int _addCol() = 0;
    366     /// \e
    367365    virtual int _addRow() = 0;
    368     /// \e
    369 
    370     /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
    371     ///
    372366    virtual void _setRowCoeffs(int i,
    373367                               int length,
    374368                               int  const * indices,
    375369                               Value  const * values ) = 0;
    376     /// \e
    377 
    378     /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
    379     ///
    380370    virtual void _setColCoeffs(int i,
    381371                               int length,
    382372                               int  const * indices,
    383373                               Value  const * values ) = 0;
    384    
    385     /// \e
    386 
    387     /// The lower bound of a variable (column) have to be given by an
    388     /// extended number of type Value, i.e. a finite number of type
    389     /// Value or -\ref INF.
    390374    virtual void _setColLowerBound(int i, Value value) = 0;
    391     /// \e
    392 
    393     /// The upper bound of a variable (column) have to be given by an
    394     /// extended number of type Value, i.e. a finite number of type
    395     /// Value or \ref INF.
    396375    virtual void _setColUpperBound(int i, Value value) = 0;
    397     /// \e
    398 
    399     /// The lower bound of a linear expression (row) have to be given by an
    400     /// extended number of type Value, i.e. a finite number of type
    401     /// Value or -\ref INF.
    402376    virtual void _setRowLowerBound(int i, Value value) = 0;
    403     /// \e
    404 
    405     /// The upper bound of a linear expression (row) have to be given by an
    406     /// extended number of type Value, i.e. a finite number of type
    407     /// Value or \ref INF.
    408377    virtual void _setRowUpperBound(int i, Value value) = 0;
    409 
    410     /// \e
    411378    virtual void _setObjCoeff(int i, Value obj_coef) = 0;
    412 
    413     ///\e
    414    
    415     ///\bug Wrong interface
    416     ///
    417379    virtual SolutionStatus _solve() = 0;
    418 
    419     ///\e
    420 
    421     ///\bug Wrong interface
    422     ///
    423380    virtual Value _getPrimal(int i) = 0;
    424     ///\e
    425 
    426     ///\bug unimplemented!!!!
     381    virtual SolutionType _getPrimalType() = 0;
     382
     383
    427384    void clearObj() {}
    428385  public:
     
    432389    virtual ~LpSolverBase() {}
    433390
    434     ///\name Building up and modification of the LP
     391    ///\name Build up and modify of the LP
    435392
    436393    ///@{
     
    439396    Col addCol() { Col c; c.id=cols.insert(_addCol()); return c;}
    440397
    441     ///\brief Fill the elements of a container with newly created columns
    442     ///(i.e a new variables)
     398    ///\brief Adds several new columns
     399    ///(i.e a variables) at once
    443400    ///
    444401    ///This magic function takes a container as its argument
     
    639596
    640597
    641     ///\name Solving the LP
     598    ///\name Solve the LP
    642599
    643600    ///@{
     
    648605    ///@}
    649606   
    650     ///\name Obtaining the solution LP
     607    ///\name Obtain the solution
    651608
    652609    ///@{
     610
     611    ///\e
     612    SolutionType primalType() {
     613      return _getPrimalType();
     614    }
    653615
    654616    ///\e
  • src/work/athos/lp/lp_glpk.cc

    r1293 r1294  
    249249  }
    250250 
     251  LpGlpk::SolutionType LpGlpk::_getPrimalType()
     252  {
     253    return OPTIMAL;
     254  }
     255 
    251256
    252257
  • src/work/athos/lp/lp_glpk.h

    r1293 r1294  
    7777    ///
    7878    virtual Value _getPrimal(int i);
     79    ///\e
     80   
     81    ///\bug Unimplemented
     82    ///
     83    virtual SolutionType _getPrimalType();
    7984
    8085  };
  • src/work/athos/lp/lp_solver_skeleton.cc

    r1293 r1294  
    7676  }
    7777 
     78  LpSolverSkeleton::SolutionType LpSolverSkeleton::_getPrimalType()
     79  {
     80    return OPTIMAL;
     81  }
     82 
    7883} //namespace lemon
    7984
  • src/work/athos/lp/lp_solver_skeleton.h

    r1293 r1294  
    3030   
    3131  protected:
     32    /// \e
    3233    virtual int _addCol();
     34    /// \e
    3335    virtual int _addRow();
     36    /// \e
     37
     38    /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
     39    ///
    3440    virtual void _setRowCoeffs(int i,
    3541                               int length,
    3642                               int  const * indices,
    3743                               Value  const * values );
     44    /// \e
     45
     46    /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
     47    ///
    3848    virtual void _setColCoeffs(int i,
    3949                               int length,
    4050                               int  const * indices,
    41                                Value  const * values);
     51                               Value  const * values );
     52   
     53    /// \e
     54
     55    /// The lower bound of a variable (column) have to be given by an
     56    /// extended number of type Value, i.e. a finite number of type
     57    /// Value or -\ref INF.
    4258    virtual void _setColLowerBound(int i, Value value);
     59    /// \e
     60
     61    /// The upper bound of a variable (column) have to be given by an
     62    /// extended number of type Value, i.e. a finite number of type
     63    /// Value or \ref INF.
    4364    virtual void _setColUpperBound(int i, Value value);
     65    /// \e
     66
     67    /// The lower bound of a linear expression (row) have to be given by an
     68    /// extended number of type Value, i.e. a finite number of type
     69    /// Value or -\ref INF.
    4470    virtual void _setRowLowerBound(int i, Value value);
     71    /// \e
     72
     73    /// The upper bound of a linear expression (row) have to be given by an
     74    /// extended number of type Value, i.e. a finite number of type
     75    /// Value or \ref INF.
    4576    virtual void _setRowUpperBound(int i, Value value);
     77
     78    /// \e
    4679    virtual void _setObjCoeff(int i, Value obj_coef);
     80
     81    ///\e
     82   
     83    ///\bug Wrong interface
     84    ///
    4785    virtual SolutionStatus _solve();
     86
     87    ///\e
     88
     89    ///\bug Wrong interface
     90    ///
    4891    virtual Value _getPrimal(int i);
     92    ///\e
     93
     94    ///\bug Wrong interface
     95    ///
     96    virtual SolutionType _getPrimalType();
     97
    4998  public:
    5099    LpSolverSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}
Note: See TracChangeset for help on using the changeset viewer.