Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test_lpmcf.cpp
Go to the documentation of this file.
1 
8 #include <iostream>
9 #include <boost/algorithm/string/predicate.hpp>
12 
13 using std::cout;
14 using std::endl;
15 
26 int main(int argc, char** argv)
27 {
28  if (argc > 1)
29  {
32 
33  string filename = argv[1];
34  if (boost::ends_with(filename, ".lgf"))
35  {
36  lpsolver1(filename);
37  lpsolver1.print_graph("graph1");
38  }
39  else if (boost::ends_with(filename, ".lp"))
40  {
41  lpsolver2(filename);
42  lpsolver2.print_graph("graph2");
43  }
44  else
45  cout << "only support .lgf and .lp file formats" << endl;
46 
47  //lpsolver();
48  }
49  else
50  cout << "at least 1 argument required\n";
51 
52  return 0;
53 }
solve linear programming problem with dual min-cost flow
solve network flow graph with min-cost flow
Definition: Lgf.h:54
int main(int argc, char **argv)
main function
Definition: test_lpmcf.cpp:26
solve linear programming with min-cost flow
virtual void print_graph(string const &filename) const
print graph
Definition: Lgf.h:112
LP solved with min-cost flow.
Definition: LpDualMcf.h:140