|
| | ORToolsSolver () |
| |
| | ~ORToolsSolver () override=default |
| |
| MaxFlowSolver< T >::Var | add_variable () override |
| | Introduces a new binary variable and returns its handle.
|
| |
| void | add_constant (T E) override |
| | Adds a constant term to the energy function.
|
| |
| void | add_edge (int i, int j, T cap, T rev_cap) |
| |
| void | add_tweights (int i, T cap_source, T cap_sink) |
| |
| void | add_term1 (typename MaxFlowSolver< T >::Var x, T E0, T E1) override |
| |
| void | add_term2 (typename MaxFlowSolver< T >::Var x, typename MaxFlowSolver< T >::Var y, T A, T B, T C, T D) override |
| |
| T | minimize () override |
| | Minimizes the energy and returns the minimum value.
|
| |
| int | get_var (typename MaxFlowSolver< T >::Var x) override |
| |
| virtual | ~MaxFlowSolver ()=default |
| |
| virtual void | add_term1 (Var x, T E0, T E1)=0 |
| | Adds a unary term E(x) where x ∈ {0, 1}.
|
| |
| virtual void | add_term2 (Var x, Var y, T E00, T E01, T E10, T E11)=0 |
| | Adds a pairwise term E(x, y) where x, y ∈ {0, 1}.
|
| |
| virtual int | get_var (Var x)=0 |
| | Returns the optimal value of variable x (0 or 1) after minimize().
|
| |
template<typename T>
class ORToolsSolver< T >
MaxFlowSolver backed by Google OR-Tools SimpleMaxFlow.
Available only when the library is built with -DUSE_OR_TOOLS=ON (the default).
- Template Parameters
-
| T | Numeric cost type. Note: OR-Tools uses integer arc capacities internally, so floating-point values get truncated inside the flow network. |