package com.prizmj.display.simulation;

import com.badlogic.gdx.graphics.g3d.model.Node;
import com.prizmj.display.Blueprint;
import com.prizmj.display.simulation.components.Edge;

/**
 * Created by GrimmityGrammity on 11/16/2016.
 *
 * A Geometric Network Model(GNM) is one of the three key components of PrizmJ.
 *
 * A GNM is a topological data model that represents the adjacency,
 *  connectivity, and hierarchical relationship between 3D entities in
 *  graph theory.
 */
public class GNM {

    private Node[] nodes;
    private Edge[] edges;

    public GNM(Blueprint blueprint) {
        create();
    }

    // TODO: Make enum
    private int create() {
        return 0;
    }

    public Node[] getNodes() {
        return nodes;
    }

    public Edge[] getEdges() {
        return edges;
    }

    public int getNumNodes() {
        return nodes.length;
    }

    public int getNumEdges() {
        return edges.length;
    }
}

@@ -48,44 +48,95 @@
 com.
-badlogic.gdx.graphics.g3d.model.Node
+prizmj.display.Blueprint;%0Aimport com.prizmj.display.simulation.components.DirectedGraph
 ;%0Aim
@@ -155,33 +155,50 @@
 zmj.display.
-Blueprint
+simulation.components.Edge
 ;%0Aimport com
@@ -235,19 +235,19 @@
 ponents.
-Edg
+Nod
 e;%0A%0A/**%0A
@@ -575,46 +575,27 @@
 ate 
-Node%5B%5D nodes;%0A    private Edge%5B%5D edges
+DirectedGraph graph
 ;%0A%0A 
@@ -740,90 +740,37 @@
    p
-ublic Node%5B%5D getNodes() %7B%0A        return nodes;%0A    %7D%0A%0A    public Edge%5B%5D getE
+rivate void addEdge(Edge e
 dge
-s(
 ) %7B%0A
@@ -777,28 +777,35 @@
         
-return 
+graph.addEdge(
 edge
-s
+)
 ;%0A    %7D%0A
@@ -814,96 +814,110 @@
    p
-ublic int getNumNodes() %7B%0A        return nodes.length;%0A    %7D%0A%0A    public int getNumEdges
+rivate void addNode(Node node) %7B%0A        graph.addNode(node);%0A    %7D%0A%0A    public DirectedGraph getGraph
 () %7B
@@ -936,19 +936,12 @@
 urn 
-edges.lengt
+grap
 h;%0A 

Add DirectedGraph. Used as backend for GNM.