def chordal_graph_cliques(G):
 if (not is_chordal(G)):
  raise nx.NetworkXError('Input graph is not chordal.')
 cliques = set()
 for C in nx.connected.connected_component_subgraphs(G):
  cliques |= _connected_chordal_graph_cliques(C)
 return cliques

def chordal_graph_cliques ( G ) : if ( not is_chordal ( G ) ) : raise nx . NetworkXError ( 'Input graph is not chordal.' ) cliques = set ( ) for C in nx . connected . connected_component_subgraphs ( G ) : cliques |= _connected_chordal_graph_cliques ( C ) return cliques
returns the set of maximal cliques of a chordal graph .