COIN-OR::LEMON - Graph Library

Changeset 540:9db62975c32b in lemon-1.2 for lemon/lp_skeleton.h


Ignore:
Timestamp:
02/26/09 08:39:16 (11 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_skeleton.h

    r529 r540  
    2323
    2424///\file
    25 ///\brief A skeleton file to implement LP solver interfaces
     25///\brief Skeleton file to implement LP/MIP solver interfaces
     26/// 
     27///The classes in this file do nothing, but they can serve as skeletons when
     28///implementing an interface to new solvers.
    2629namespace lemon {
    2730
    28   ///A skeleton class to implement LP solver interfaces
     31  ///A skeleton class to implement LP/MIP solver base interface
     32 
     33  ///This class does nothing, but it can serve as a skeleton when
     34  ///implementing an interface to new solvers.
    2935  class SkeletonSolverBase : public virtual LpBase {
    3036    int col_num,row_num;
     
    137143  };
    138144
    139   /// \brief Interface for a skeleton LP solver
     145  /// \brief Skeleton class for an LP solver interface
    140146  ///
    141   /// This class implements an interface for a skeleton LP solver.
     147  ///This class does nothing, but it can serve as a skeleton when
     148  ///implementing an interface to new solvers.
     149
    142150  ///\ingroup lp_group
    143   class LpSkeleton : public SkeletonSolverBase, public LpSolver {
     151  class LpSkeleton : public LpSolver, public SkeletonSolverBase {
    144152  public:
    145     LpSkeleton() : SkeletonSolverBase(), LpSolver() {}
    146 
     153    ///\e
     154    LpSkeleton() : LpSolver(), SkeletonSolverBase() {}
     155    ///\e
     156    virtual LpSkeleton* newSolver() const;
     157    ///\e
     158    virtual LpSkeleton* cloneSolver() const;
    147159  protected:
    148160
     
    174186
    175187    ///\e
    176     virtual LpSkeleton* _newSolver() const;
    177     ///\e
    178     virtual LpSkeleton* _cloneSolver() const;
    179     ///\e
    180188    virtual const char* _solverName() const;
    181189
    182190  };
    183191
    184   /// \brief Interface for a skeleton MIP solver
     192  /// \brief Skeleton class for a MIP solver interface
    185193  ///
    186   /// This class implements an interface for a skeleton MIP solver.
     194  ///This class does nothing, but it can serve as a skeleton when
     195  ///implementing an interface to new solvers.
    187196  ///\ingroup lp_group
    188   class MipSkeleton : public SkeletonSolverBase, public MipSolver {
     197  class MipSkeleton : public MipSolver, public SkeletonSolverBase {
    189198  public:
    190     MipSkeleton() : SkeletonSolverBase(), MipSolver() {}
     199    ///\e
     200    MipSkeleton() : MipSolver(), SkeletonSolverBase() {}
     201    ///\e
     202    virtual MipSkeleton* newSolver() const;
     203    ///\e
     204    virtual MipSkeleton* cloneSolver() const;
    191205
    192206  protected:
     
    216230
    217231    ///\e
    218     virtual MipSkeleton* _newSolver() const;
    219 
    220     ///\e
    221     virtual MipSkeleton* _cloneSolver() const;
    222     ///\e
    223232    virtual const char* _solverName() const;
    224 
    225233  };
    226234
Note: See TracChangeset for help on using the changeset viewer.