#NEWLINE# def test_clique_removal( ) : #NEWLINE# #INDENT# graph = nx . complete_graph ( 10 ) #NEWLINE# ( i , cs ) = apxa . clique_removal ( graph ) #NEWLINE# idens = nx . density ( graph . subgraph ( i ) ) #NEWLINE# eq_ ( idens , 0.0 , 'i-set not found by clique_removal!' ) #NEWLINE# for clique in cs : #NEWLINE# #INDENT# cdens = nx . density ( graph . subgraph ( clique ) ) #NEWLINE# eq_ ( cdens , 1.0 , 'clique not found by clique_removal!' ) #NEWLINE# #UNINDENT# graph = nx . trivial_graph ( nx . Graph ( ) ) #NEWLINE# ( i , cs ) = apxa . clique_removal ( graph ) #NEWLINE# idens = nx . density ( graph . subgraph ( i ) ) #NEWLINE# eq_ ( idens , 0.0 , 'i-set not found by ramsey!' ) #NEWLINE# for clique in cs : #NEWLINE# #INDENT# cdens = nx . density ( graph . subgraph ( clique ) ) #NEWLINE# eq_ ( cdens , 0.0 , 'clique not found by clique_removal!' ) #NEWLINE# #UNINDENT# graph = nx . barbell_graph ( 10 , 5 , nx . Graph ( ) ) #NEWLINE# ( i , cs ) = apxa . clique_removal ( graph ) #NEWLINE# idens = nx . density ( graph . subgraph ( i ) ) #NEWLINE# eq_ ( idens , 0.0 , 'i-set not found by ramsey!' ) #NEWLINE# for clique in cs : #NEWLINE# #INDENT# cdens = nx . density ( graph . subgraph ( clique ) ) #NEWLINE# eq_ ( cdens , 1.0 , 'clique not found by clique_removal!' )