Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Edge

An edge in a Graph. Like a SimpleEdge, but with additional information for convenience and efficiency.

An edge is specified by which nodes are its "start" and "end." The direction of an edge is arbitrary, but once set will be handled consistently by the Graph methods.

The edge may also specify internal locations which it passes through on its way between its endpoints. That is, an edge may curve and does not necessarily represent a physical straight line.

Hierarchy

Index

Properties

endNodeId

endNodeId: NodeId

ID of the Node at the end of the edge.

id

id: EdgeId

An identifier, unique across all edges in a given Graph.

Optional innerLocations

innerLocations: Location[]

Additional locations that the edge passes through which are not represented by Nodes.

length

length: number

The total length of this edge.

locationDistances

locationDistances: number[]

The cumulative distances of each location along the path. This array will always have the same number of elements as locations. locationDistances[i] is the total distance one must travel along the edge to arrive at locations[i]. In particular, this means that locationDistances[0] is always 0 and locationDistances[locations.length - 1] is always length.

locations

locations: Location[]

The locations which make up this edge from start to finish. Like innerLocations, but including the locations of the start and end Nodes.

startNodeId

startNodeId: NodeId

ID of the Node at the start of this edge.

Generated using TypeDoc