dwave_networkx.algorithms.independent_set.is_independent_set¶
-
is_independent_set(G, indep_nodes)[source]¶ Determines whether the given nodes form an independent set.
An independent set is a set of nodes such that the subgraph of G induced by these nodes contains no edges.
Parameters: - G (NetworkX graph) –
- indep_nodes (list) – List of nodes that the form a maximum independent set, as determined by the given sampler.
Returns: is_independent – True if indep_nodes form an independent set.
Return type: