The maximum_cycle_ratio() function calculates the maximum cycle ratio of a
weighted directed multigraph G=(V,E,W1,W2), where V is a vertex set,
E is an edge set, W1 and W2 are edge weight functions, W2 is nonnegative.
As a multigraph, G can have multiple edges connecting a pair of vertices.

Let every edge e has two weights W1(e) and W2(e).
Let c be a cycle of the graphg. Then, the cycle ratio, cr(c), is defined as:

The maximum (minimum) cycle ratio (mcr) is the maximum (minimum) cycle ratio
of all cycles of the graph. A cycle is called critical if its ratio is equal
to the mcr. The calculated maximum cycle ratio will be the return value
of the function. The maximum_cycle_ratio()/minimum_cycle_ratio() returns
-FloatTraits::infinity()/FloatTraits::infinity() if graph has no cycles.
If the pcc parameter is not zero then one critical cycle will be written
to the corresponding std::vector of edge descriptors. The edges in the
vector stored in the way such that *pcc[0], *ppc[1], ..., *ppc[n] is a
correct path.

Where Defined

Parameters

IN: FloatTraits

The FloatTrats encapsulates customizable limits-like information for
floating point types. This type must provide an associated type,
value_type for the floating point type.
The default value is boost::mcr_float<>which has the following
definition:

The value FloatTraits::epsilon() controls the "tolerance" of the
algorithm. By increasing the absolute value of epsilon you may slightly decrease
the execution time but there is a risk to skip a global optima. By decreasing
the absolute value you may fall to the infinite loop. The best option is to
leave this parameter unchanged.

Complexity

There is no known precise upper bound for the time complexity of the
algorithm. Imperical time complexity is O(|E|), where the constant tends to
be pretty small (about 20-30). Space complexity is equal to 7*|V| plus the
space required to store a graph.