DGraph - shahar-furer/Ex2 GitHub Wiki

class DGraph includes:

  • public node_data getNode-return the node_data by the node_id
  • public edge_data getEdge-return the data of the edge, null if none.
  • public void addNode-add a new node to the graph with the given node_data.(in case of adding an existing node, the new value will be saved instead of the old value).
  • public void connect-Connect an edge with weight w between node src to node dest.(adding an existing edge will not be allowed).
  • public Collection<node_data> getV-return a pointer for the collection representing all the nodes in the graph.
  • public Collection<edge_data> getE-return a pointer for the collection representing all the edges getting out of the given node (all the edges starting (source) at the given node).
  • public node_data removeNode-Delete the node (with the given ID) from the graph and removes all edges which starts or ends at this node.
  • public edge_data removeEdge-Delete the edge from the graph
  • public int nodeSize- return the number of vertices (nodes) in the graph.
  • public int edgeSize-return the number of edges.
  • public int getMC-return the Mode Count.
⚠️ **GitHub.com Fallback** ⚠️