Skip to content

Commit

Permalink
networkx
Browse files Browse the repository at this point in the history
  • Loading branch information
piman51277 committed Dec 24, 2024
1 parent 39f44ff commit 07e7df9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/netx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import networkx as nx

G = nx.Graph()

# adding nodes
G.add_node(1)
G.add_node(2)

# adding edges
G.add_edge(1, 2)

# get cliques
nx.find_cliques(G)

nx.connected_components(G)

0 comments on commit 07e7df9

Please sign in to comment.