COIN-OR::LEMON - Graph Library

Changeset 1381:998e8def9676 in lemon-0.x for src/demo/lp_demo.cc


Ignore:
Timestamp:
04/22/05 19:47:01 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1834
Message:
  • lp_cplex.h, lp_cplex.cc added
  • lp_demo.cc and lp_maxflow_demo.cc uses GLPK is it is found CPLEX otherwise
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/demo/lp_demo.cc

    r1362 r1381  
    11#include <iostream>
     2
     3
     4#ifdef HAVE_GLPK
    25#include <lemon/lp_glpk.h>
     6#elif HAVE_CPLEX
     7#include <lemon/lp_cplex.h>
     8#endif
     9
    310using namespace lemon;
     11
     12#ifdef HAVE_GLPK
     13typedef LpGlpk LpDefault;
     14#elif HAVE_CPLEX
     15typedef LpCplex LpDefault;
     16#endif
    417
    518int main()
     
    720 //The following example is taken from the documentation of the GLPK library.
    821 //See it in the GLPK reference manual and among the GLPK sample files (sample.c)
    9   LpGlpk lp;
    10   typedef LpGlpk::Row Row;
    11   typedef LpGlpk::Col Col;
     22  LpDefault lp;
     23  typedef LpDefault::Row Row;
     24  typedef LpDefault::Col Col;
    1225
    1326  lp.max();
Note: See TracChangeset for help on using the changeset viewer.