networkit.independentset

class networkit.independentset.IndependentSetFinder

Bases: object

Abstract base class for independent set algorithms.

isIndependentSet(set, G)

Checks whether a given set is an independent set in graph G.

Parameters:
  • G (networkit.Graph) – The input graph.

  • nodeSet (list(bool)) – Input list, where each entry represents a node. If entry is True, the node is part of the set; False if not.

Return type:

bool

run(G)

Returns a list, where an entry indicates whether node i is part of an independent set.

Parameters:

G (networkit.Graph) – The graph.

Returns:

A list of bools.

Return type:

list(bool)

class networkit.independentset.Luby

Bases: IndependentSetFinder

Luby’s parallel maximal independent set algorithm.