dwave_networkx.algorithms.elimination_ordering.is_simplicial#

is_simplicial(G, n)[source]#

Determines whether a node n in G is simplicial.

Parameters:
  • G (NetworkX graph) – The graph on which to check whether node n is simplicial.

  • n (node) – A node in graph G.

Returns:

is_simplicial – True if its neighbors form a clique.

Return type:

bool

Examples

This example checks whether node 0 is simplicial for two graphs: G, a single Chimera unit cell, which is bipartite, and K_5, the \(K_5\) complete graph.

>>> G = dnx.chimera_graph(1, 1, 4)
>>> K_5 = nx.complete_graph(5)
>>> dnx.is_simplicial(G, 0)
False
>>> dnx.is_simplicial(K_5, 0)
True