lemon/lp_utils.h
changeset 2378 c479eab00a18
parent 2369 6ae1a97055a2
child 2391 14a343be7a5a
equal deleted inserted replaced
4:793f7f757837 5:5fea70dc02d8
    28 #include <set>
    28 #include <set>
    29 
    29 
    30 
    30 
    31 namespace lemon {
    31 namespace lemon {
    32 
    32 
    33   /// \ingroup gen_opt_tools
    33   /// \ingroup lp_utils
    34   ///
    34   ///
    35   /// \brief The map for the result of the lp variables.
    35   /// \brief The map for the result of the lp variables.
    36   ///
    36   ///
    37   /// The map for the result of the lp variables.
    37   /// The map for the result of the lp variables.
    38   class LpResultMap {
    38   class LpResultMap {
    49     }
    49     }
    50   private:
    50   private:
    51     const LpSolverBase& lp;
    51     const LpSolverBase& lp;
    52   };
    52   };
    53 
    53 
    54   /// \ingroup gen_opt_tools
    54   /// \ingroup lp_utils
       
    55   ///
       
    56   /// \brief Returns an \ref LpResultMap class
       
    57   ///
       
    58   /// This function just returns an \ref LpResultMap class.
       
    59   /// \relates LpResultMap
       
    60   LpResultMap lpResultMap(const LpSolverBase& lp) {
       
    61     return LpResultMap(lp);
       
    62   }
       
    63 
       
    64   /// \ingroup lp_utils
    55   ///
    65   ///
    56   /// \brief The map for the name of the lp variables.
    66   /// \brief The map for the name of the lp variables.
    57   ///
    67   ///
    58   /// The map for the name of the lp variables.
    68   /// The map for the name of the lp variables.
    59   class LpColNameMap {
    69   class LpColNameMap {
    70     }
    80     }
    71   private:
    81   private:
    72     const LpSolverBase& lp;
    82     const LpSolverBase& lp;
    73   };
    83   };
    74 
    84 
    75   /// \ingroup gen_opt_tools
    85   /// \ingroup lp_utils
    76   ///
    86   ///
    77   /// \brief Writeable map for the name of the lp variables.
    87   /// \brief Writeable map for the name of the lp variables.
    78   ///
    88   ///
    79   /// Writeable map for the name of the lp variables.
    89   /// Writeable map for the name of the lp variables.
    80   class LpColNameWriteMap {
    90   class LpColNameWriteMap {
    94     }
   104     }
    95   private:
   105   private:
    96     LpSolverBase& lp;
   106     LpSolverBase& lp;
    97   };
   107   };
    98 
   108 
    99   /// \ingroup gen_opt_tools
   109   /// \ingroup lp_utils
   100   ///
   110   ///
   101   /// \brief Returns an \ref LpColNameMap class
   111   /// \brief Returns an \ref LpColNameMap class
   102   ///
   112   ///
   103   /// This function just returns an \ref LpColNameMap class.
   113   /// This function just returns an \ref LpColNameMap class.
   104   /// \relates LpColNameMap
   114   /// \relates LpColNameMap
   108 
   118 
   109   LpColNameWriteMap lpColNameMap(LpSolverBase& lp) {
   119   LpColNameWriteMap lpColNameMap(LpSolverBase& lp) {
   110     return LpColNameWriteMap(lp);
   120     return LpColNameWriteMap(lp);
   111   }
   121   }
   112 
   122 
   113   /// \ingroup gen_opt_tools
   123   /// \ingroup lp_utils
   114   ///
   124   ///
   115   /// \brief Lp variable item reader for Lemon IO
   125   /// \brief Lp variable item reader for Lemon IO
   116   ///
   126   ///
   117   /// This class is an Lp variable item reader for Lemon IO. It makes
   127   /// This class is an Lp variable item reader for Lemon IO. It makes
   118   /// possible to store lp variables in lemon file. The usage of this
   128   /// possible to store lp variables in lemon file. The usage of this
   195     
   205     
   196     LpSolverBase& lp;
   206     LpSolverBase& lp;
   197 
   207 
   198   };
   208   };
   199 
   209 
   200   /// \ingroup gen_opt_tools
   210   /// \ingroup lp_utils
   201   ///
   211   ///
   202   /// \brief Lp variable item writer for Lemon IO
   212   /// \brief Lp variable item writer for Lemon IO
   203   ///
   213   ///
   204   /// This class is an Lp variable item writer for Lemon IO. It makes
   214   /// This class is an Lp variable item writer for Lemon IO. It makes
   205   /// possible to store lp variables in lemon file. The usage of this
   215   /// possible to store lp variables in lemon file. The usage of this
   261     const LpSolverBase& lp;
   271     const LpSolverBase& lp;
   262     mutable int num;
   272     mutable int num;
   263 
   273 
   264   };
   274   };
   265 
   275 
   266   /// \ingroup gen_opt_tools
   276   /// \ingroup lp_utils
   267   ///
   277   ///
   268   /// \brief Lp section reader for lemon IO
   278   /// \brief Lp section reader for lemon IO
   269   ///
   279   ///
   270   /// This section reader provides an easy way to read an Lp problem
   280   /// This section reader provides an easy way to read an Lp problem
   271   /// from a file. The lemon lp section format contains three parts.
   281   /// from a file. The lemon lp section format contains three parts.
   741     LpSolverBase& lp;
   751     LpSolverBase& lp;
   742     std::string name;
   752     std::string name;
   743   };
   753   };
   744 
   754 
   745 
   755 
   746   /// \ingroup gen_opt_tools
   756   /// \ingroup lp_utils
   747   ///
   757   ///
   748   /// \brief Lp section writer for lemon IO
   758   /// \brief Lp section writer for lemon IO
   749   ///
   759   ///
   750   /// This section reader provides an easy way to write an Lp problem
   760   /// This section reader provides an easy way to write an Lp problem
   751   /// to a file. The lemon lp section format contains three parts.
   761   /// to a file. The lemon lp section format contains three parts.