template<typename DiGraph, typename ParametricAPI>
MaxParametricSolver class

Maximum Parametric Solver.

Template parameters
DiGraph
ParametricAPI

This class solves the following parametric network problem:

max r s.t. dist[v] - dist[u] <= distrance(e, r) \forall e(u, v) \in gra(V, E)

A parametric network problem refers to a type of optimization problem that involves finding the optimal solution to a network flow problem as a function of one single parameter.

Public types

using Nbrs1 = decltype((*std::declval<DiGraph>().begin()).second)
using Nbrs = std::remove_cv_t<std::remove_reference_t<Nbrs1>>
using Edge1 = decltype((*std::declval<Nbrs>().begin()).second)
using Edge = std::remove_cv_t<std::remove_reference_t<Edge1>>
using Cycle = std::vector<Edge>

Constructors, destructors, conversion operators

MaxParametricSolver(const DiGraph& gra, ParametricAPI& omega)

Public functions

template<typename Ratio, typename Mapping, typename Domain>
auto run(Ratio& r_opt, Mapping& dist, Domain) -> auto

Function documentation

template<typename DiGraph, typename ParametricAPI>
MaxParametricSolver<DiGraph, ParametricAPI>::MaxParametricSolver(const DiGraph& gra, ParametricAPI& omega)

Parameters
gra in The parameter "gra" is of type DiGraph and it represents a directed graph. It is used as input for the constructor of the MaxParametricSolver class.
omega in omega is an object of type ParametricAPI.

The MaxParametricSolver constructor initializes the MaxParametricSolver object with a given DiGraph and ParametricAPI.

template<typename DiGraph, typename ParametricAPI> template<typename Ratio, typename Mapping, typename Domain>
auto MaxParametricSolver<DiGraph, ParametricAPI>::run(Ratio& r_opt, Mapping& dist, Domain)

Template parameters
Ratio
Mapping
Domain
Parameters
r_opt in r_opt is a reference to a variable of type Ratio.
dist in The dist parameter is a mapping that represents the distance between two elements in a domain. It is used in the get_weight lambda function to calculate the weight of an edge.
Returns The function run returns an object of type Cycle.

The function "run" iteratively finds the minimum weight cycle in a graph until the weight of the current minimum cycle is greater than or equal to a given ratio.