grinpy.invariants.independence.is_independent_set¶
-
grinpy.invariants.independence.
is_independent_set
(G, nbunch)¶ Return whether or not the nodes in nbunch comprise an independent set.
An set S of nodes in G is called an independent set if no two nodes in S are neighbors of one another.
- G : graph
- A Networkx graph.
nbunch : a single node or iterable container of nodes.
- isIndependent : bool
- True if the nodes in nbunch comprise an independent set, False otherwise.
is_k_independent_set