buildSpatialModelFromAdjacencyMatrix

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. The element data[i][j] of the matrix contains an array of String [d0;...;dn] representing the values on the edge between i and j, or null if this edge does not exist. This array is converted to a MoonLightRecord via the provided RecordHandler.

Return

a SpatialModel.

Parameters

locations

number of locations.

edgeRecordHandler

handler for edges data type.

data

adjacency matrix.


public static SpatialModel<MoonLightRecord> buildSpatialModelFromAdjacencyMatrix(int locations, RecordHandler edgeRecordHandler, Array<Array<Array<double>>> objects)

This is an utility method that builds a SpatialModel from an adjacency matrix represented as an array of doubles. The element data[i][j] of the matrix contains an array of String [d0;...;dn] representing the values on the edge between i and j, or null if this edge does not exist. This array is converted to a MoonLightRecord via the provided RecordHandler.

Return

a SpatialModel.

Parameters

locations

number of locations.

edgeRecordHandler

handler for edges data type.

objects

adjacency matrix.