Interface CoresAlgo
- All Known Implementing Classes:
CoresAlgoAbstract
,CoresAlgoImpl
Given a graph \(G=(V,E)\), a subgraph \(H\) induced by a subset of vertices \(W\) is a \(k\)-core or a core of order
\(k\) if \(\forall v \in W : deg_H(v) \geq k\) and \(H\) is a maximal subgraph with this property. The core number of
vertex is the highest order of a core that contains this vertex. The degree \(deg(v)\) can be: in-degree, out-degree,
in-degree + out-degree, determining different types of cores. See EdgeDirection
for more details.
Use newInstance()
to get a default implementation of this interface.
- Author:
- Barak Ugav
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The result of the cores computation forIntGraph
.static interface
The result of the cores computation. -
Method Summary
Modifier and TypeMethodDescriptiondefault <V,
E> CoresAlgo.Result <V, E> computeCores
(Graph<V, E> g) Compute the cores of the graph with respect to both in and out degree of the vertices.<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.static CoresAlgo
Create a new cores algorithm object.
-
Method Details
-
computeCores
Compute the cores of the graph with respect to both in and out degree of the vertices.If
g
isIntGraph
, the returned object isCoresAlgo.IResult
.For a detail description of the cores definition, see the interface documentation
CoresAlgo
.- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a graph- Returns:
- the cores of the graph
-
computeCores
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
.- 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
-
newInstance
Create a new cores algorithm object.This is the recommended way to instantiate a new
CoresAlgo
object.- Returns:
- a default implementation of
CoresAlgo
-