-
Notifications
You must be signed in to change notification settings - Fork 1
DWGraph_DS | Functions (and PACKAGE API)
shaCode256 edited this page Dec 28, 2020
·
1 revision
This project's weighted directed graph functions include:
- save()- Saving the graph into a file
- load()- Loading a graph from a file
- shortestPath()- Find the lighted (the minimal weight of edges) path between two nodes using Dijkstra's algorithm, implemented by a queue
- shortestPathDist()- Returning the shortest path's between two nodes weight
- add(node_data node)- Adding nodes to a graph
- remove(node_data node)- Removing nodes from a graph
- AddEdge(node_data src, node_data dest)- #tochange- Adding neighbors to nodes in the graph- meaning creating an edge between two nodes, starting from the src node to the dest node
- RemoveEdge(node_data src, node_data dest)- Removing neighbors to nodes in the graph- meaning creating an edge between two nodes, starting from the src node to the dest node
- Receiving the neighbors of a particular junction
- setInfo()- Adding information to the nodes themselves, in two information values ("variables") for each node
- isConnected()- Checking the connectivity of the graph, is it a connected graph or not.
- copy()- Deep copy of a graph
##This graph is the "star" of the package API.
##Package API's hierarchy
Tests of this graph include:
##Interface directed_weighted graph (of DWGraph_DS CLASS)
We resemble it with:
##GeoLocation interface
resemble the location (x,y,z) in the 3D dimension of an edge, uses for the game
##GeoLocation test
Got any additions/ comments? We would love to hear.