Bases: object
Algorithm for computing a valid spectral coloring for a given graph.
G (networkit.Graph) – The graph to compute the spectral coloring for.
Helper method for computing spectral coloring. This function does not need to be called, it is sufficient to call run() for the SpectralColoring-object.
Returns a valid coloring for a given graph. Each node has a color ID to be mapped onto a color palette.
A list of nodes containing a valid color mapping.
list(int)
Computes eigenvalues and eigenvector in order to prepare the spectral coloring. This function does not need to be called, it is sufficient to call run() for the SpectralColoring-object.
Main method of SpectralColoring. This computes a valid coloring.
Helper method for computing spectral coloring. This function does not need to be called, it is sufficient to call run() for the SpectralColoring-object.
color (int) – colorID to split corresponding nodes into colorID and new color.
depth (int, optional) – Sets index of eigenvector to compare to depth. Default: 0
Checks whether colorID is valid
color (int) – colorID to check for.
Returns True if valid, False if not.
bool