Module org.jgrapht.core
Package org.jgrapht.alg.interfaces
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:
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.jgrapht.alg.interfaces.MatchingAlgorithm.Matching
isPerfect, iterator
-
Constructor Details
-
MatchingImpl
Construct a new instance- Parameters:
graph
- graph on which the matching is definededges
- the edges of the matchingweight
- the weight of the matching
-
-
Method Details
-
getGraph
Description copied from interface:MatchingAlgorithm.Matching
Returns the graph over which this matching is defined.- Specified by:
getGraph
in interfaceMatchingAlgorithm.Matching<V,
E> - Returns:
- the graph
-
getWeight
public double getWeight()Returns the weight of the matching.- Specified by:
getWeight
in interfaceMatchingAlgorithm.Matching<V,
E> - Returns:
- the weight of the matching
-
getEdges
Get the edges of the matching.- Specified by:
getEdges
in interfaceMatchingAlgorithm.Matching<V,
E> - Returns:
- the edges of the matching
-
isMatched
Returns true if vertex v is incident to an edge in this matching.- Specified by:
isMatched
in interfaceMatchingAlgorithm.Matching<V,
E> - Parameters:
v
- vertex- Returns:
- true if vertex v is incident to an edge in this matching.
-
toString
-