Skip to content

How to use: Using the DiGraph() Functions and its algorithms

shaCode256 edited this page Mar 4, 2021 · 1 revision

How to use?

You can start creating a graph by the command: g = DiGraph() Then add nodes using the g.addNode (key) command. Continue as you wish. The project is full of descriptions about the functions and their use.

All the files regards the graph are here:

Get into the DiGraph():

get_into_graph

Some examples how to create a graph and use it,

are in the tests.

Here you can see how to create a new graph, create new nodes AND connect them in the graph

(create an edge between them):

Running Tests1

Here you can see how to use the basic functions of the graph:

a

a

a

a

Here you can see how to use some of the graph algorithms-

Some are on g1 graph, illustrated:

a

Using graph algorithms, in tests:

a

a

a

![a](

Loading and saving from / to json files:

When using save_tp_json() func,the graph is saved in this format. And, when using load_from_json() func, the graph's algorithm is comaptible with reading graph files in this format.

Little json graph

a

Bigger sized Graph

a

Clone this wiki locally