move to DynamicPointGraph
Flags : cached
Expression : `const g = this.theGraph; const allEdges = g.edges(); let source = ""; let target = ""; let sourcePoint; let targetPoint; let result = [];
for (let j = 0; j < allEdges.length; j++) { const edge = allEdges[j]; source = g.source(edge); target = g.target(edge); if(source != target){ sourcePoint = g.getNodeAttribute(g.source(edge),'data'); targetPoint = g.getNodeAttribute(g.target(edge),'data'); result.push({"edge": edge, "source": source, "target": target, "sourcePoint": sourcePoint, "targetPoint": targetPoint}); } } result = R.removeDuplicates(result); return result;`
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.
Flags : cached, parameter
Default expression : []
Internal binder/breaker pattern binder.
Flags : cached
Expression : true
Internal binder/breaker pattern breaker.
Flags : None. (Note this is uncached)
Expression : R.model.unbindSlot(this, 'graphBinder')
If true
, creates directed edges when building the graph.
Flags : cached, parameter
Default expression : false
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.
Flags : cached, parameter
Default expression : []
Accessor to the internal graphology object.
Flags : cached
Expression : this.graphBinder; return this.getGraph();
The name of the weight attribute in the edge data, for used in weighted graphs.
Flags : cached, parameter
Default expression : "weight"
Adds a directed edge from source to target, with optional associated data. Returns the edge name.
Flags : method (Note this is uncached)
Adds an undirected edge between source and target, with optional associated data. Returns the edge name.
Flags : method (Note this is uncached)
Adds a named node to the graph, with associated data, and returns its name. The name must be unique in the graph.
Flags : method (Note this is uncached)
Removes all data from the graph.
Flags : method (Note this is uncached)
The graph object, an instance of a Graphology graph. Do not reference this directly, call getGraph() to obtain the graphology object.
Flags : method (Note this is uncached)
Returns whether the given edge, identified by the two nodes it connects, is in the path, given by an array of nodes in order of traversal. Such a path can be returned by shortestPath.
Flags : method (Note this is uncached)
Returns whether the given node, identified by its name, is in the path, given by an array of nodes in order of traversal. Such a path can be returned by shortestPath.
Flags : method (Note this is uncached)
Returns the set of edges that define a minimum spanning tree on the current graph.
Flags : method (Note this is uncached)
The function to use to compute the name of a node, given the node index and data. This function must produce a unique name for every node in the graph. Override this to provide your own node-naming function.
Flags : method (Note this is uncached)
Returns the shortest path from startNode to endNode as an ordered array of node names. If there is no shortest path, an empty array is returned.
Flags : method (Note this is uncached)
DynamicGraph (d.1.0)
Mixins: BaseNode
This Design wraps the Graphology graph theory library. It uses the binder/breaker pattern like DynamicList. The graph can be created either by supplying the nodeData and edgeData, by referencing an existing graph to copy, or by directly calling addNode and edgeNode to build the graph.