Limbo
3.5.4
Toggle main menu visibility
Loading...
Searching...
No Matches
test
solvers
lpmcf
test_lpmcf.cpp
Go to the documentation of this file.
1
7
8
#include <iostream>
9
#include <boost/algorithm/string/predicate.hpp>
10
#include <
limbo/solvers/lpmcf/Lgf.h
>
11
#include <
limbo/solvers/lpmcf/LpDualMcf.h
>
12
13
using
std::cout;
14
using
std::endl;
15
26
int
main
(
int
argc,
char
** argv)
27
{
28
if
(argc > 1)
29
{
30
limbo::solvers::lpmcf::Lgf<long>
lpsolver1;
31
limbo::solvers::lpmcf::LpDualMcf<long>
lpsolver2;
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
}
Lgf.h
solve linear programming with min-cost flow
LpDualMcf.h
solve linear programming problem with dual min-cost flow
limbo::solvers::lpmcf::Lgf
solve network flow graph with min-cost flow
Definition
Lgf.h:55
limbo::solvers::lpmcf::Lgf::print_graph
virtual void print_graph(string const &filename) const
print graph
Definition
Lgf.h:112
limbo::solvers::lpmcf::LpDualMcf
LP solved with min-cost flow.
Definition
LpDualMcf.h:141
main
int main()
Definition
test_ChromaticNumber.cpp:78
Generated on
for Limbo by
1.17.0