COIN-OR::LEMON - Graph Library

Changeset 765:4405b6be83bb in lemon-0.x for src/work/marci/lp


Ignore:
Timestamp:
08/19/04 13:31:40 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1027
Message:

Add empty docs in order to make the functions and classes visible in
doxygen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/lp/lp_solver_wrapper.h

    r764 r765  
    22#ifndef HUGO_LP_SOLVER_WRAPPER_H
    33#define HUGO_LP_SOLVER_WRAPPER
     4
     5///\ingroup misc
     6///\file
     7///\brief Dijkstra algorithm.
    48
    59// #include <stdio.h>
     
    3135
    3236namespace hugo {
     37
     38 
     39  /// \addtogroup misc
     40  /// @{
    3341
    3442  /// \brief A partitioned vector with iterable classes.
     
    120128    /// Returns the data pointed by \c it.
    121129    const T& operator[](ClassIt it) const { return nodes[it.i].data; }
     130    ///.
    122131    class ClassIt {
    123132      friend class IterablePartition;
     
    185194
    186195  public:
     196    ///.
    187197    LPX* lp;
     198    ///.
    188199    typedef IterablePartition<int>::ClassIt RowIt;
     200    ///.
    189201    IterablePartition<int> row_iter_map;
     202    ///.
    190203    typedef IterablePartition<int>::ClassIt ColIt;
     204    ///.
    191205    IterablePartition<int> col_iter_map;
    192206    //std::vector<int> row_id_to_lp_row_id;
    193207    //std::vector<int> col_id_to_lp_col_id;
     208    ///.
    194209    const int VALID_ID;
     210    ///.
    195211    const int INVALID_ID;
    196212
    197213  public:
     214    ///.
    198215    LPSolverWrapper() : lp(lpx_create_prob()),
    199216                        row_iter_map(2),
     
    203220      lpx_set_int_parm(lp, LPX_K_DUAL, 1);
    204221    }
     222    ///.
    205223    ~LPSolverWrapper() {
    206224      lpx_delete_prob(lp);
    207225    }
     226    ///.
    208227    void setMinimize() {
    209228      lpx_set_obj_dir(lp, LPX_MIN);
    210229    }
     230    ///.
    211231    void setMaximize() {
    212232      lpx_set_obj_dir(lp, LPX_MAX);
    213233    }
     234    ///.
    214235    ColIt addCol() {
    215236      int i=lpx_add_cols(lp, 1); 
     
    230251      return col_it;
    231252    }
     253    ///.
    232254    RowIt addRow() {
    233255      int i=lpx_add_rows(lp, 1); 
     
    243265    }
    244266    //pair<RowIt, double>-bol kell megadni egy std range-et
     267    ///.
    245268    template <typename Begin, typename End>
    246269    void setColCoeffs(const ColIt& col_it,
     
    260283    }
    261284    //pair<ColIt, double>-bol kell megadni egy std range-et
     285    ///.
    262286    template <typename Begin, typename End>
    263287    void setRowCoeffs(const RowIt& row_it,
     
    276300      delete [] doubles;
    277301    }
     302    ///.
    278303    void eraseCol(const ColIt& col_it) {
    279304      col_iter_map.set(col_it, VALID_ID, INVALID_ID);
     
    288313      }
    289314    }
     315    ///.
    290316    void eraseRow(const RowIt& row_it) {
    291317      row_iter_map.set(row_it, VALID_ID, INVALID_ID);
     
    300326      }
    301327    }
     328    ///.
    302329    void setColBounds(const ColIt& col_it, int bound_type,
    303330                      double lo, double up) {
    304331      lpx_set_col_bnds(lp, col_iter_map[col_it], bound_type, lo, up);
    305332    }
     333    ///.
    306334    void setObjCoef(const ColIt& col_it, double obj_coef) {
    307335      lpx_set_obj_coef(lp, col_iter_map[col_it], obj_coef);
    308336    }
     337    ///.
    309338    void setRowBounds(const RowIt& row_it, int bound_type,
    310339                      double lo, double up) {
     
    314343//     lpx_set_obj_coef(lp, row_iter_map[row_it], obj_coef);
    315344//   }
     345    ///.
    316346    void solveSimplex() { lpx_simplex(lp); }
     347    ///.
    317348    void solvePrimalSimplex() { lpx_simplex(lp); }
     349    ///.
    318350    void solveDualSimplex() { lpx_simplex(lp); }
     351    ///.
    319352    double getPrimal(const ColIt& col_it) {
    320353      return lpx_get_col_prim(lp, col_iter_map[col_it]);
    321354    }
     355    ///.
    322356    double getObjVal() { return lpx_get_obj_val(lp); }
     357    ///.
    323358    int rowNum() const { return lpx_get_num_rows(lp); }
     359    ///.
    324360    int colNum() const { return lpx_get_num_cols(lp); }
     361    ///.
    325362    int warmUp() { return lpx_warm_up(lp); }
     363    ///.
    326364    void printWarmUpStatus(int i) {
    327365      switch (i) {
     
    332370      }
    333371    }
     372    ///.
    334373    int getPrimalStatus() { return lpx_get_prim_stat(lp); }
     374    ///.
    335375    void printPrimalStatus(int i) {
    336376      switch (i) {
     
    341381      }
    342382    }
     383    ///.
    343384    int getDualStatus() { return lpx_get_dual_stat(lp); }
     385    ///.
    344386    void printDualStatus(int i) {
    345387      switch (i) {
     
    354396      return lpx_get_row_stat(lp, row_iter_map[row_it]);
    355397    }
     398    ///.
    356399    void printRowStatus(int i) {
    357400      switch (i) {
     
    367410      return lpx_get_col_stat(lp, col_iter_map[col_it]);
    368411    }
     412    ///.
    369413    void printColStatus(int i) {
    370414      switch (i) {
     
    377421    }
    378422  };
     423 
     424  /// @}
    379425
    380426} //namespace hugo
Note: See TracChangeset for help on using the changeset viewer.