Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hhchen1105 authored Sep 24, 2020
1 parent 45d37e4 commit 66e4643
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Put the "networkx_addon/" folder inside your source directory

1. network propagation

```Python
>>> import networkx
>>> import networkx_addon
>>> G = networkx.DiGraph()
Expand All @@ -42,10 +43,13 @@ Put the "networkx_addon/" folder inside your source directory
>>> G.add_edge(3,1,act_prob=.2)
>>> G.add_edge(2,3,act_prob=.3)
>>> networkx_addon.information_propagation.independent_cascade(G, [1], steps=2)
```

2. network similarity

```Python
>>> import networkx
>>> import networkx_addon
>>> G = networkx.Graph()
>>> G.add_edges_from([(0,1),(1,2),(0,2)])
```

0 comments on commit 66e4643

Please sign in to comment.