|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
40 namespace matching_blossom {
42 template<
class TWeight>
48 template<
class TWeight>
49 class BlossomVHelper :
public BlossomHelper<TWeight> {
80 template<
class WeightContainer>
101 return m_y[v] + (auxNode ? auxNode->delta(v) : 0);
132 return infinity<TWeight>();
The namespace for all OGDF objects.
EpsilonTest m_eps
The epsilon test used for floating point comparisons.
Includes declaration of graph class.
An extension of the standard priority queue with additional features.
bool init(const Graph &graph, const WeightContainer &weights, AuxGraph< TWeight > *auxGraph)
Initialize the helper with the given data.
E getTopEligibleElement(BlossomPQ< E, TWeight > &pq)
Checks if the top element of the given pq has realValue == 0 and returns it, if possible.
TWeight getRealTopPriority(BlossomPQ< E, TWeight > &pq)
Returns the real value (realReducedWeight or realY) of the top element in the priority queue,...
TWeight getRealReducedWeight(edge e) override
Gets the actual reduced weight of the edge, taking into account the delta of the corresponding trees.
long currentIteration
The current iteration of the algorithm.
Helper class for the blossom matching algorithms.
Utility class for the Blossom algorithm, providiing access to all important data structures.
AuxGraph< TWeight > * m_auxGraph
BlossomVHelper(bool greedyInit)
Construct a new Blossom V Helper object.
bool empty() const
Checks whether the queue is empty.
node source() const
Returns the source node of the edge.
Data type for general directed graphs (adjacency list representation).
const E & topElement() const
Returns the topmost element in the queue.
TWeight realValue(node v)
Returns the realY of v.
E getTopElement(BlossomPQ< E, TWeight > &pq)
Helper function to get the top element of any priority queue.
Utility functions and classes regarding map access and iteration.
Class for the representation of edges.
TWeight realY(node v)
Returns the actual y value of the node, taking into account the delta of the corresponding tree.
A custom priority queue for the blossom algorithm, based on the PrioritizedMapQueue....
node target() const
Returns the target node of the edge.
TWeight realValue(edge e)
Returns the realReducedWeight of e.
Class for the representation of nodes.
bool isZeroCostNode(node v)
Checks if the realValue of b is zero.