Open-source package for graphs,graph-algorithms
Project description
About
Is an open-source graph package that contains algorithms for undirected/directed graphs and its written in Python3.6 .
Code Example
from XGraph import *
if __name__ == "__main__":
names = ['a','b','c','d'] # node-name list
g = Graph() # Create the Graph instance
createNodes(g,names) # Create the nodes based on the names list
# Create the Weighted Edges
g.addEdge('a','b',1)
g.addEdge('b','c',2)
g.addEdge('c','a',3)
g.addEdge('c','d',6)
# Print the graph
printGraph(g)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
XGraph-1.2.2.tar.gz
(2.0 kB
view hashes)