Package org.jgrapht.alg.interfaces
Class MatchingAlgorithm.MatchingImpl<E>
- java.lang.Object
-
- org.jgrapht.alg.interfaces.MatchingAlgorithm.MatchingImpl<E>
-
- Type Parameters:
E
- the graph edge type
- All Implemented Interfaces:
java.io.Serializable
,MatchingAlgorithm.Matching<E>
- Enclosing interface:
- MatchingAlgorithm<V,E>
public static class MatchingAlgorithm.MatchingImpl<E> extends java.lang.Object implements MatchingAlgorithm.Matching<E>, java.io.Serializable
A default implementation of the matching interface.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<E>
edges
private static long
serialVersionUID
private double
weight
-
Constructor Summary
Constructors Constructor Description MatchingImpl(java.util.Set<E> edges, double weight)
Construct a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<E>
getEdges()
Get the edges of the matching.double
getWeight()
Returns the weight of the matching.java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
edges
private java.util.Set<E> edges
-
weight
private double weight
-
-
Constructor Detail
-
MatchingImpl
public MatchingImpl(java.util.Set<E> edges, double weight)
Construct a new instance- Parameters:
edges
- the edges of the matchingweight
- the weight of the matching
-
-
Method Detail
-
getWeight
public double getWeight()
Returns the weight of the matching.- Specified by:
getWeight
in interfaceMatchingAlgorithm.Matching<E>
- Returns:
- the weight of the matching
-
getEdges
public java.util.Set<E> getEdges()
Get the edges of the matching.- Specified by:
getEdges
in interfaceMatchingAlgorithm.Matching<E>
- Returns:
- the edges of the matching
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-