PointLineGraph design is an extension of NodeGraph with the following additional characteristics:
1.) It is geometric; the nodes are Points and the edges are Lines, with default weight of their length.
Parameter Rules supplied by the NodeGraph mixin.
edgeData: | An array of edge descriptions, where each edge is an array of three items: a source index, a target index, and an object containing custom data for the edge. The indexes are into the nodeData array. For a weighted graph, the custom data should contain a property with the [[weightAttributeName]], for use by the algorithms to compute the cost of routes. This can only be supplied if [[nodeData]] is supplied. This is optional; if no edges are supplied, the graph starts without any, and they can be created using calls to [[addEdge]] or [[addDirectedEdge]]. |
isDirected: | If true, creates directed edges when building the graph. |
nodeData: | An array of data objects, one for each node. The objects do not have any required content. This is optional; if no nodes are supplied, the graph starts empty, and can be created using calls to [[addNode]]. |
weightAttributeName: | The name of the weight attribute in the edge data, for used in weighted graphs. |
Mixins
BaseNode
BaseModel
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
---|---|---|---|---|
edgeData |
array |
[] |
Inputs |
Cached |
isDirected |
boolean |
false |
Inputs |
Cached |
nodeData |
array |
[] |
Inputs |
Cached |
weightAttributeName |
string |
"weight" |
Inputs |
Cached |
Future example here.