Package com.jgalgo.alg.cores
Class CoresAlgoAbstract
- java.lang.Object
-
- com.jgalgo.alg.cores.CoresAlgoAbstract
-
- All Implemented Interfaces:
CoresAlgo
- Direct Known Subclasses:
CoresAlgoImpl
public abstract class CoresAlgoAbstract extends Object implements CoresAlgo
Abstract class for computing the cores of a graph.The class implements the interface by solving the problem on the index graph and then maps the results back to the original graph. The implementation for index graphs is abstract and left to the subclasses.
- Author:
- Barak Ugav
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jgalgo.alg.cores.CoresAlgo
CoresAlgo.IResult, CoresAlgo.Result<V,E>
-
-
Constructor Summary
Constructors Constructor Description CoresAlgoAbstract()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V,E>
CoresAlgo.Result<V,E>computeCores(Graph<V,E> g, EdgeDirection degreeType)
Compute the cores of the graph with respect the given degree type.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jgalgo.alg.cores.CoresAlgo
computeCores
-
-
-
-
Method Detail
-
computeCores
public <V,E> CoresAlgo.Result<V,E> computeCores(Graph<V,E> g, EdgeDirection degreeType)
Description copied from interface:CoresAlgo
Compute the cores of the graph with respect the given degree type.Cores are defined with respect to either the out edges, in edges, or both. For undirected graphs the degree type is ignored.
If
g
isIntGraph
, the returned object isCoresAlgo.IResult
.For a detail description of the cores definition, see the interface documentation
CoresAlgo
.- Specified by:
computeCores
in interfaceCoresAlgo
- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a graphdegreeType
- the degree type the cores are computed with respect to- Returns:
- the cores of the graph
-
-