|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Exact optimum returned by most_negative_cycle_up_to_3(). More...
#include <Negative_Cycles.H>
Public Member Functions | |
| bool | is_negative () const noexcept |
| Whether the optimum has strictly negative total cost. | |
Public Attributes | |
| bool | has_cycle = false |
| Whether a cycle within the bound exists. | |
| Cost_Type | total_cost = Cost_Type{0} |
| Exact weight sum, rounded for floating-point costs. | |
| size_t | length = 0 |
| Number of arcs, at most three. | |
| DynList< typename GT::Node * > | cycle_nodes |
| Closed node list, first node repeated last. | |
| DynList< typename GT::Arc * > | cycle_arcs |
| Original arcs aligned with consecutive nodes. | |
Exact optimum returned by most_negative_cycle_up_to_3().
When has_cycle, the witness is a minimum-total-cost simple cycle within the requested bound, with the fewest arcs among all minimizers. Floating-point weights are compared as exact binary numbers; only the published total is rounded (within one ulp, with the exact sign). Unlike Bounded_Cycle_Result, this result needs no relaxed-walk certificate. Pointers belong to the input graph and share its lifetime requirements.
| GT | Directed graph type. |
| Cost_Type | Arc weight type. |
Definition at line 343 of file Negative_Cycles.H.
|
inlinenoexcept |
Whether the optimum has strictly negative total cost.
Definition at line 354 of file Negative_Cycles.H.
References Aleph::and, Aleph::Short_Cycle_Result< GT, Cost_Type >::has_cycle, and Aleph::Short_Cycle_Result< GT, Cost_Type >::total_cost.
| DynList<typename GT::Arc *> Aleph::Short_Cycle_Result< GT, Cost_Type >::cycle_arcs |
Original arcs aligned with consecutive nodes.
Definition at line 349 of file Negative_Cycles.H.
Referenced by Aleph::most_negative_cycle_up_to_3().
| DynList<typename GT::Node *> Aleph::Short_Cycle_Result< GT, Cost_Type >::cycle_nodes |
Closed node list, first node repeated last.
Definition at line 348 of file Negative_Cycles.H.
Referenced by Aleph::most_negative_cycle_up_to_3().
| bool Aleph::Short_Cycle_Result< GT, Cost_Type >::has_cycle = false |
Whether a cycle within the bound exists.
Definition at line 345 of file Negative_Cycles.H.
Referenced by Aleph::Short_Cycle_Result< GT, Cost_Type >::is_negative(), and Aleph::most_negative_cycle_up_to_3().
| size_t Aleph::Short_Cycle_Result< GT, Cost_Type >::length = 0 |
Number of arcs, at most three.
Definition at line 347 of file Negative_Cycles.H.
Referenced by Aleph::most_negative_cycle_up_to_3().
| Cost_Type Aleph::Short_Cycle_Result< GT, Cost_Type >::total_cost = Cost_Type{0} |
Exact weight sum, rounded for floating-point costs.
Definition at line 346 of file Negative_Cycles.H.
Referenced by Aleph::Short_Cycle_Result< GT, Cost_Type >::is_negative(), and Aleph::most_negative_cycle_up_to_3().