[Lemon-commits] [lemon_svn] marci: r1511 - hugo/trunk/src/work/marci/lp

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:45:57 CET 2006


Author: marci
Date: Tue Feb  1 16:26:47 2005
New Revision: 1511

Modified:
   hugo/trunk/src/work/marci/lp/lp_solver_base.h

Log:
try of grouping for documentation


Modified: hugo/trunk/src/work/marci/lp/lp_solver_base.h
==============================================================================
--- hugo/trunk/src/work/marci/lp/lp_solver_base.h	(original)
+++ hugo/trunk/src/work/marci/lp/lp_solver_base.h	Tue Feb  1 16:26:47 2005
@@ -177,10 +177,18 @@
     The aim of this class is to give a general surface to different 
     solvers, i.e. it makes possible to write algorithms using LP's, 
     in which the solver can be changed to an other one easily.
+    \nosubgrouping
   */
   template <typename _Value>
   class LPSolverBase {
+    
+    /*! @name Unchategorized functions and types (public members)
+    */
+    //@{
   public:
+
+    //UNCATEGORIZED
+
     /// \e
     typedef _Value Value;
     /// \e
@@ -205,18 +213,78 @@
 		     VALID_CLASS(0), INVALID_CLASS(1) { }
     /// \e
     virtual ~LPSolverBase() { }
+    //@}
 
-    //MATRIX INDEPEDENT MANIPULATING FUNCTIONS
-
+    /*! @name Medium level interface (public members)
+      These functions appear in the low level and also in the high level 
+      interfaces thus these each of these functions have to be implemented 
+      only once in the different interfaces.
+      This means that these functions have to be reimplemented for all of the 
+      different lp solvers. These are basic functions, and have the same 
+      parameter lists in the low and high level interfaces. 
+    */
+    //@{
   public:
+
+    //UNCATEGORIZED FUNCTIONS
+
     /// \e
     virtual void setMinimize() = 0;
     /// \e
     virtual void setMaximize() = 0;
 
-    //LOW LEVEL INTERFACE, MATRIX MANIPULATING FUNCTIONS
+    //SOLVER FUNCTIONS
+
+    /// \e
+    virtual void solveSimplex() = 0;
+    /// \e
+    virtual void solvePrimalSimplex() = 0;
+    /// \e
+    virtual void solveDualSimplex() = 0;
+    /// \e
+
+    //SOLUTION RETRIEVING
+
+    /// \e
+    virtual _Value getObjVal() = 0;
+
+    //OTHER FUNCTIONS
 
+    /// \e
+    virtual int rowNum() const = 0;
+    /// \e
+    virtual int colNum() const = 0;
+    /// \e
+    virtual int warmUp() = 0;
+    /// \e
+    virtual void printWarmUpStatus(int i) = 0;
+    /// \e
+    virtual int getPrimalStatus() = 0;
+    /// \e
+    virtual void printPrimalStatus(int i) = 0;
+    /// \e
+    virtual int getDualStatus() = 0;
+    /// \e
+    virtual void printDualStatus(int i) = 0;
+    /// Returns the status of the slack variable assigned to row \c row_it.
+    virtual int getRowStat(const RowIt& row_it) = 0;
+    /// \e
+    virtual void printRowStatus(int i) = 0;
+    /// Returns the status of the variable assigned to column \c col_it.
+    virtual int getColStat(const ColIt& col_it) = 0;
+    /// \e
+    virtual void printColStatus(int i) = 0;
+
+    //@}
+
+    /*! @name Low level interface (protected members)
+      Problem manipulating functions in the low level interface
+    */
+    //@{
   protected:
+
+    //MATRIX MANIPULATING FUNCTIONS
+
     /// \e
     virtual int _addCol() = 0;
     /// \e
@@ -279,16 +347,21 @@
     virtual void _setObjCoef(int i, _Value obj_coef) = 0;
     /// \e
     virtual _Value _getObjCoef(int i) = 0;
+    
+    //SOLUTION RETRIEVING
 
-    //LOW LEVEL, SOLUTION RETRIEVING FUNCTIONS
-
-  protected:
     /// \e
     virtual _Value _getPrimal(int i) = 0;
+    //@}
+    
+    /*! @name High level interface (public members)
+      Problem manipulating functions in the high level interface
+    */
+    //@{
+  public:
 
-    //HIGH LEVEL INTERFACE, MATRIX MANIPULATING FUNTIONS
+    //MATRIX MANIPULATING FUNCTIONS
 
-  public:
     /// \e
     ColIt addCol() {
       int i=_addCol();  
@@ -402,12 +475,29 @@
       return _getObjCoef(col_iter_map[col_it]);
     }
 
-    //MOST HIGH LEVEL, USER FRIEND FUNCTIONS
+    //SOLUTION RETRIEVING FUNCTIONS
+
+    /// \e
+    _Value getPrimal(const ColIt& col_it) {
+      return _getPrimal(col_iter_map[col_it]);
+    }    
+
+    //@}
+
+    /*! @name User friend interface
+      Problem manipulating functions in the user friend interface
+    */
+    //@{
+
+    //EXPRESSION TYPES
 
     /// \e
     typedef Expr<ColIt, _Value> Expression;
     /// \e
     typedef Expr<RowIt, _Value> DualExpression;
+
+    //MATRIX MANIPULATING FUNCTIONS
+
     /// \e
     void setRowCoeffs(RowIt row_it, const Expression& expr) {
       std::vector<std::pair<int, _Value> > row_coeffs;
@@ -435,54 +525,7 @@
 	setObjCoef((*i).first, (*i).second);
       }
     }
-
-    //SOLVER FUNCTIONS
-
-    /// \e
-    virtual void solveSimplex() = 0;
-    /// \e
-    virtual void solvePrimalSimplex() = 0;
-    /// \e
-    virtual void solveDualSimplex() = 0;
-    /// \e
-
-    //HIGH LEVEL, SOLUTION RETRIEVING FUNCTIONS
-
-  public:
-
-    /// \e
-    _Value getPrimal(const ColIt& col_it) {
-      return _getPrimal(col_iter_map[col_it]);
-    }
-    /// \e
-    virtual _Value getObjVal() = 0;
-
-    //OTHER FUNCTIONS
-
-    /// \e
-    virtual int rowNum() const = 0;
-    /// \e
-    virtual int colNum() const = 0;
-    /// \e
-    virtual int warmUp() = 0;
-    /// \e
-    virtual void printWarmUpStatus(int i) = 0;
-    /// \e
-    virtual int getPrimalStatus() = 0;
-    /// \e
-    virtual void printPrimalStatus(int i) = 0;
-    /// \e
-    virtual int getDualStatus() = 0;
-    /// \e
-    virtual void printDualStatus(int i) = 0;
-    /// Returns the status of the slack variable assigned to row \c row_it.
-    virtual int getRowStat(const RowIt& row_it) = 0;
-    /// \e
-    virtual void printRowStatus(int i) = 0;
-    /// Returns the status of the variable assigned to column \c col_it.
-    virtual int getColStat(const ColIt& col_it) = 0;
-    /// \e
-    virtual void printColStatus(int i) = 0;
+    //@}
   };
   
   template <typename _Value>



More information about the Lemon-commits mailing list