Skip to content

d-kmr/randomGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

randomGraph: create a random graph and convert the created graph to a dot format file

[Requirements]

  • OCaml
  • OCaml yacc
  • OCaml lexer
  • make
  • xdot or something

[Compile]

$ make

--> two executables gengraph and grp2dot are created

[Usage]

$ ./randomGraph.sh

[Usage of gengraph]

$ ./gengraph [options]

(creates random graph with nodes 0,1,2,..,num-1 and shows it on stdout)

[Options for gengraph]

-u : generates undirected graph

-w : number of weights of each edge (default=1)

-d : set denseness of graphs [0:sparse .. 9:dense] (default=5)

[Usage of grp2dot]

$ ./grp2dot

(converts the input to a dot format file and shows it on stdout)

[grp file example1]

directed

(0,1,10,3)

(1,3,14,5)

(2,4,3,2)

This means a directed graph with edges:

0 -[10,3]-> 1

1 -[14,5]-> 3

2 -[3,2]-> 4

[grp file example2]

undirected

(0,1,10,3)

(1,3,14,5)

(2,4,3,2)

This means an undirected graph with edges:

0 -[10,3]- 1

1 -[14,5]- 3

2 -[3,2]- 4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published