Class CoresAlgoImpl

java.lang.Object
com.jgalgo.alg.cores.CoresAlgoAbstract
com.jgalgo.alg.cores.CoresAlgoImpl
All Implemented Interfaces:
CoresAlgo

public class CoresAlgoImpl extends CoresAlgoAbstract
Linear cores computing algorithm.

The algorithm compute the core number of each vertex by computing the 0-core, than the 1-core, 2-core, ect. It does so by removing all vertices with degree less than the current core number.

The algorithm runs in linear time.

Based on 'An O(m) Algorithm for Cores Decomposition of Networks' by Batagelj, V. and Zaversnik, M.

Author:
Barak Ugav
  • Constructor Details

    • CoresAlgoImpl

      public CoresAlgoImpl()
      Create a new cores computing algorithm object.

      Please prefer using CoresAlgo.newInstance() to get a default implementation for the CoresAlgo interface.