Skip to content

DWGraph_DS | Functions (and PACKAGE API)

shaCode256 edited this page Dec 28, 2020 · 1 revision

Don't miss our rich javaDoc documents!! In this projects DOCS directory.

Has this graphs whole functions described.

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. api

##Package API's hierarchy a

Functions:

java_doc1

Tests of this graph include:

DWGraph_DS test:

java_doc2

##Interface directed_weighted graph (of DWGraph_DS CLASS) a

Interface of graph algo:

a

DWGraph_Algo- the graphs' algorithms class-

java_doc2

DWGraph_Algo test:

java_doc2

The graph is build from nodes, a bunch of (potenial) Node_Datas:

java_doc2

Node datas' test:

![a] (https://github.com/Dvir-Segal/Ex2OopUpdate/blob/master/Pictures/javadocs/API%20-%20DWGRAPH%20and%20gameService/NodeData%20test.PNG)

The graph may contain EDGES- which means two nodes are connected in a certain direction.

We resemble it with:

Inteface edge_data (of EdgeData CLASS)

a

EdgeData CLASS

a

Game_Service inteface

a

edge_location interface

a

Edge Location CLASS-

a

##GeoLocation interface a

GeoLocation CLASS-

resemble the location (x,y,z) in the 3D dimension of an edge, uses for the game a

##GeoLocation test a

Got any additions/ comments? We would love to hear.

Clone this wiki locally