Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
kramer
cycle-coalescence-algorithm
Commits
a970ecb3
Unverified
Commit
a970ecb3
authored
Jan 09, 2021
by
Felix
Committed by
GitHub
Jan 09, 2021
Browse files
Update README.md
parent
53f0c309
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
a970ecb3
...
...
@@ -8,13 +8,16 @@ pip install cycle-analysis
```
python
import
networkx
as
nx
import
cycle_analysis.cycle_coalescence
as
cc
import
cycle_analysis.test
as
cat
# generate a dummy graph for testing
# put an edge weight distribution on the system, available are random/gradient/bigradient/nested_square
G
=
nx
.
grid_graph
((
7
,
7
,
1
))
G
=
ag
.
generate_pattern
(
G
,
'nested_square'
)
G
=
cat
.
generate_pattern
(
G
,
'nested_square'
)
# merge all shortest cycles and calc the merging tree's asymmetry
asymmetry
=
ag
.
calc_cycle_asymmetry
(
G
)
asymmetry
=
cc
.
calc_cycle_asymmetry
(
G
)
print
(
asymmetry
)
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment