com.raphtory.algorithms.generic.Coreness

Coreness

Coreness(1, 6)

Identify the maximal k for each vertex (the coreness, or k-core number) for which the vertex is in a k-core, here trying values of k from 1 to 6.

https://en.wikipedia.org/wiki/Degeneracy_(graph_theory)

Parameters

start: Int

The value of k to start trying values from (inclusive).

end: Int

The value of k to end at (inclusive).

States

CORENESS: Int

Stores the k value of maximum k-core the vertex is in out of the k values that have been tried.

Returns

vertex name

coreness

name: String

CORENESS: Int

Implementation

The algorithm repeats KCore for start to end values of k, using the resetStates = false flag on KCore so it only runs on the nodes in the previous (as the KCores with k = 3 is a subgraph of the KCores with k = 2 etc). It updates the CORENESS state for all the nodes still alive in that KCore run, so the CORENESS state contains the highest value of k run of which that vertex was in the k-cores.