COIN-OR::LEMON - Graph Library

Changeset 540:9db62975c32b in lemon-main for lemon/lp_base.h


Ignore:
Timestamp:
02/26/09 08:39:16 (15 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Fix newSolver()/cloneSolver() API in LP tools + doc improvements (#230)

  • More logical structure for newSolver()/cloneSolver()
  • Fix compilation problem with gcc-3.3
  • Doc improvements
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/lp_base.h

    r490 r540  
    919919
    920920    //Abstract virtual functions
    921     virtual LpBase* _newSolver() const = 0;
    922     virtual LpBase* _cloneSolver() const = 0;
    923921
    924922    virtual int _addColId(int col) { return cols.addIndex(col); }
     
    987985    /// Virtual destructor
    988986    virtual ~LpBase() {}
    989 
    990     ///Creates a new LP problem
    991     LpBase* newSolver() {return _newSolver();}
    992     ///Makes a copy of the LP problem
    993     LpBase* cloneSolver() {return _cloneSolver();}
    994987
    995988    ///Gives back the name of the solver.
     
    18221815  public:
    18231816
     1817    ///Allocate a new LP problem instance
     1818    virtual LpSolver* newSolver() const = 0;
     1819    ///Make a copy of the LP problem
     1820    virtual LpSolver* cloneSolver() const = 0;
     1821
    18241822    ///\name Solve the LP
    18251823
     
    19361934    ///@}
    19371935
    1938     LpSolver* newSolver() {return _newSolver();}
    1939     LpSolver* cloneSolver() {return _cloneSolver();}
    1940 
    19411936  protected:
    19421937
    1943     virtual LpSolver* _newSolver() const = 0;
    1944     virtual LpSolver* _cloneSolver() const = 0;
    19451938  };
    19461939
     
    19761969    };
    19771970
     1971    ///Allocate a new MIP problem instance
     1972    virtual MipSolver* newSolver() const = 0;
     1973    ///Make a copy of the MIP problem
     1974    virtual MipSolver* cloneSolver() const = 0;
     1975
    19781976    ///\name Solve the MIP
    19791977
     
    20632061    virtual Value _getSolValue() const = 0;
    20642062
    2065   public:
    2066 
    2067     MipSolver* newSolver() {return _newSolver();}
    2068     MipSolver* cloneSolver() {return _cloneSolver();}
    2069 
    2070   protected:
    2071 
    2072     virtual MipSolver* _newSolver() const = 0;
    2073     virtual MipSolver* _cloneSolver() const = 0;
    20742063  };
    20752064
Note: See TracChangeset for help on using the changeset viewer.