Skip to content

Generates random walk for given set of graph nodes based on Tarjan algorithm

Notifications You must be signed in to change notification settings

joanna350/Generate-Random-Walk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Generate Random Walk

  • given a graph in the format of the files under the folder sample/, returns possible random walks
  • length and number of random walks are read in from stdin as user input through argparser
  • Tarjan algorithm utilised for efficiency over existing modules

Environment

Python 3.9.5
macOS Catalina 10.15.7

Dependencies

random
pathlib
logging=='0.5.1.2'
argparse=='1.1'
networkx=='2.5.1'

Directory

  • sample/*.txt : Folder with graph data following the format
  • pathGeneration.py : Main file to invoke with arguments

To run on command line

$ python3 pathGeneration.py -filepath sample/0.txt -L 3 -N 3
INFO:root:['A', 'C', 'D']
INFO:root:['D', 'C', 'D']
INFO:root:['D', 'C', 'D']

About

Generates random walk for given set of graph nodes based on Tarjan algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages