MinLCA algorithms
|
Class defining a relaxed linear programming model for MinLCA. More...
#include <lp-model.hh>
Public Member Functions | |
MinLCALpModel (const Graph &g, int maxK, bool silent=true) | |
Constructor. More... | |
double | solve () |
Solve the linear model. More... | |
double | getValue () |
Retrieve the value of the objective function. More... | |
std::vector< int > | getColourOrder (const Node &v) |
Get the colour preference induced by the solution. More... | |
Protected Types | |
typedef lemon::GrbLp | Lp |
Protected Member Functions | |
TEMPLATE_GRAPH_TYPEDEFS (Graph) | |
Protected Attributes | |
int | _k |
Index of the largest colour. | |
std::vector< Lp::Col > | _used_colours |
Model variables for used colours. | |
Graph::template NodeMap< vector< Lp::Col > > | _vertex_colours |
Model variables for vertex colours. | |
Graph::template NodeMap< Lp::Expr > | _vertex_c |
Map of expressions to calculate the colour of a vertex. | |
Graph::template EdgeMap< Lp::Col > | _dist |
Map of expressions to calculate the cost of an edge. | |
Lp::Expr | _lca_expr |
Expression with the objective function (the cost) | |
Lp | _model |
The internal Lp model. | |
Class defining a relaxed linear programming model for MinLCA.
Read the report of Bachelor's Thesis Algorithms for the linear colouring arrangement problem for more information.
Definition at line 27 of file lp-model.hh.
|
inline |
Constructor.
g | Graph for which to build the model |
maxK | Maximum number of allowed colours |
silent | Hide Gurobi output from console? |
Definition at line 46 of file lp-model.hh.
|
inline |
Get the colour preference induced by the solution.
v | Vertex for which we want the colour preferences |
Definition at line 137 of file lp-model.hh.
|
inline |
Retrieve the value of the objective function.
Definition at line 127 of file lp-model.hh.
|
inline |
Solve the linear model.
Definition at line 118 of file lp-model.hh.