Class MatchingAlgorithm.MatchingImpl<V,E>
java.lang.Object
org.jgrapht.alg.interfaces.MatchingAlgorithm.MatchingImpl<V,E>
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
Serializable, Iterable<E>, MatchingAlgorithm.Matching<V,E>
- Enclosing interface:
MatchingAlgorithm<V,E>
public static class MatchingAlgorithm.MatchingImpl<V,E>
extends Object
implements MatchingAlgorithm.Matching<V,E>, Serializable
A default implementation of the matching interface.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface MatchingAlgorithm.Matching
isPerfect, iterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
graph
-
edges
-
weight
private double weight -
matchedVertices
-
-
Constructor Details
-
MatchingImpl
-
-
Method Details
-
getGraph
Description copied from interface:MatchingAlgorithm.MatchingReturns the graph over which this matching is defined.- Specified by:
getGraphin interfaceMatchingAlgorithm.Matching<V,E> - Returns:
- the graph
-
getWeight
public double getWeight()Returns the weight of the matching.- Specified by:
getWeightin interfaceMatchingAlgorithm.Matching<V,E> - Returns:
- the weight of the matching
-
getEdges
-
isMatched
Returns true if vertex v is incident to an edge in this matching.- Specified by:
isMatchedin interfaceMatchingAlgorithm.Matching<V,E> - Parameters:
v- vertex- Returns:
- true if vertex v is incident to an edge in this matching.
-
toString
-