Class 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
    • Constructor Detail

      • CoresAlgoAbstract

        public CoresAlgoAbstract()
        Default constructor.
    • 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 is IntGraph, the returned object is CoresAlgo.IResult.

        For a detail description of the cores definition, see the interface documentation CoresAlgo.

        Specified by:
        computeCores in interface CoresAlgo
        Type Parameters:
        V - the vertices type
        E - the edges type
        Parameters:
        g - a graph
        degreeType - the degree type the cores are computed with respect to
        Returns:
        the cores of the graph