Module org.jgrapht.core
Package org.jgrapht.alg.interfaces
Class CycleBasisAlgorithm.CycleBasisImpl<V,E>
java.lang.Object
org.jgrapht.alg.interfaces.CycleBasisAlgorithm.CycleBasisImpl<V,E>
 Type Parameters:
V
 the graph vertex typeE
 the graph edge type
 All Implemented Interfaces:
Serializable
,CycleBasisAlgorithm.CycleBasis<V,
E>
 Enclosing interface:
 CycleBasisAlgorithm<V,
E>
public static class CycleBasisAlgorithm.CycleBasisImpl<V,E>
extends Object
implements CycleBasisAlgorithm.CycleBasis<V,E>, Serializable
Default implementation of the undirected cycle basis interface.
 See Also:

Constructor Summary

Method Summary
Modifier and TypeMethodDescriptionReturn the set of cycles of the cycle basis.Return the set of cycles of the cycle basis.int
Get the length of the cycle basis.double
Get the weight of the cycle basis.

Constructor Details

CycleBasisImpl
Construct a new instance. Parameters:
graph
 the graph

CycleBasisImpl
Construct a new instance. Parameters:
graph
 the graphcycles
 the cycles of the basislength
 the length of the cycle basisweight
 the weight of the cycle basis


Method Details

getCycles
Return the set of cycles of the cycle basis. Specified by:
getCycles
in interfaceCycleBasisAlgorithm.CycleBasis<V,
E>  Returns:
 the set of cycles of the cycle basis

getLength
public int getLength()Get the length of the cycle basis. The length of the cycle basis is the sum of the lengths of its cycles. The length of a cycle is the total number of edges of the cycle. Specified by:
getLength
in interfaceCycleBasisAlgorithm.CycleBasis<V,
E>  Returns:
 the length of the cycles basis

getWeight
public double getWeight()Get the weight of the cycle basis. The weight of the cycle basis is the sum of the weights of its cycles. The weight of a cycle is the sum of the weights of its edges. Specified by:
getWeight
in interfaceCycleBasisAlgorithm.CycleBasis<V,
E>  Returns:
 the length of the cycles basis

getCyclesAsGraphPaths
Return the set of cycles of the cycle basis. Specified by:
getCyclesAsGraphPaths
in interfaceCycleBasisAlgorithm.CycleBasis<V,
E>  Returns:
 the set of cycles of the cycle basis
