GraphModel

public class GraphModel<E> implements SpatialModel<E>

Spatial model that implements a generic graph.

Author

loreti

Constructors

Link copied to clipboard
public void GraphModel(int size)

Functions

Link copied to clipboard
public void add(int src, E value, int trg)
Link copied to clipboard
public static SpatialModel<MoonLightRecord> buildSpatialModelFromAdjacencyList(int locations, RecordHandler edgeRecordHandler, Array<Array<double>> data)
This is an utility method that builds a SpatialModel from an adjacency list represented as an array of doubles.
public static SpatialModel<MoonLightRecord> buildSpatialModelFromAdjacencyList(int locations, RecordHandler edgeRecordHandler, Array<Array<String>> data)
This is an utility method that builds a SpatialModel from an adjacency list represented as an array of String.
Link copied to clipboard
public static SpatialModel<MoonLightRecord> buildSpatialModelFromAdjacencyMatrix(int locations, RecordHandler edgeRecordHandler, Array<Array<Array<double>>> objects)
public static SpatialModel<MoonLightRecord> buildSpatialModelFromAdjacencyMatrix(int locations, RecordHandler edgeRecordHandler, Array<Array<Array<String>>> data)
This is an utility method that builds a SpatialModel from an adjacency matrix represented as an array of doubles.
Link copied to clipboard
public E get(int source, int target)
Returns the value of the edge connecting src to trg.
Link copied to clipboard
public static Boolean isFull(Array<double> array)
public static Boolean isFull(Array<String> array)
Link copied to clipboard
public List<Pair<Integer, E>> next(int location)
Returns the list of exiting edges from l.
Link copied to clipboard
public List<Pair<Integer, E>> previous(int location)
Returns the list of incoming edges in l.
Link copied to clipboard
public void remove(int src, int trg)
Link copied to clipboard
public int size()