COIN-OR::LEMON - Graph Library

Changeset 1104:23a54f889272 in lemon-0.x


Ignore:
Timestamp:
01/28/05 15:33:32 (19 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1503
Message:

small changes, a try for max flow using expression

Location:
src/work/marci/lp
Files:
1 added
2 edited

Legend:

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

    r1100 r1104  
    1111#include <iostream>
    1212#include <map>
     13#include <limits>
    1314// #include <stdio>
    1415//#include <stdlib>
     
    197198    /// \e
    198199    const int INVALID_CLASS;
     200    /// \e
     201    static const _Value INF;
    199202  public:
    200203    /// \e
     
    222225    /// \e
    223226    virtual void _setRowCoeffs(int i,
    224                                std::vector<std::pair<int, double> > coeffs) = 0;
     227                               const std::vector<std::pair<int, _Value> >& coeffs) = 0;
    225228    /// \e
    226229    virtual void _setColCoeffs(int i,
    227                                std::vector<std::pair<int, double> > coeffs) = 0;
     230                               const std::vector<std::pair<int, _Value> >& coeffs) = 0;
    228231    /// \e
    229232    virtual void _eraseCol(int i) = 0;
     
    424427  };
    425428 
     429  template <typename _Value>
     430  const _Value LPSolverBase<_Value>::INF=std::numeric_limits<_Value>::infinity();
     431
    426432
    427433  /// \brief Wrappers for LP solvers
     
    475481    /// \e
    476482    virtual void _setRowCoeffs(int i,
    477                                std::vector<std::pair<int, double> > coeffs) {
     483                               const std::vector<std::pair<int, double> >& coeffs) {
    478484      int mem_length=1+colNum();
    479485      int* indices = new int[mem_length];
     
    495501    /// \e
    496502    virtual void _setColCoeffs(int i,
    497                                std::vector<std::pair<int, double> > coeffs) {
     503                               const std::vector<std::pair<int, double> >& coeffs) {
    498504      int mem_length=1+rowNum();
    499505      int* indices = new int[mem_length];
  • src/work/marci/lp/makefile

    r1097 r1104  
    66LDFLAGS  =  -lglpk#-lcplex -lm -lpthread -lilocplex -L/usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_mt# -L$(GLPKROOT)/lib
    77
    8 BINARIES = expression_test max_flow_by_lp# sample sample2 sample11 sample15
     8BINARIES = max_flow_expression expression_test max_flow_by_lp# sample sample2 sample11 sample15
    99
    1010#include ../makefile
Note: See TracChangeset for help on using the changeset viewer.