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