Struct EdgeData
Represents an edge in the SpatialGraph
Implements
System.IComparable<EdgeData>
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Mars.Common.Collections.Graph
Assembly: Mars.Common.dll
Syntax
[MessagePackObject(true)]
public struct EdgeData : IComparable<EdgeData>
Constructors
| Improve this Doc View SourceEdgeData(Int32, IDictionary<String, Object>, Position[], Int32[], Double, Int32, Int32, Int32[], Boolean, IList<Int32>)
Initializes the edge.
Declaration
[SerializationConstructor]
public EdgeData(int key, IDictionary<string, object> data, Position[] geometry, int[] geometryLength, double length, int from, int to, int[] accessibleBy = null, bool isHelperEdge = false, IList<int> shortcutPath = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | key | Internal and SpatialGraph specific identifier |
System.Collections.Generic.IDictionary<System.String, System.Object> | data | Any data that is associated with the edge. |
Position[] | geometry | The shape of the line that represents this edge. |
System.Int32[] | geometryLength |
The distance of each coordinate along the geometry
starting from the source.
|
System.Double | length | The concrete distance of this edge. |
System.Int32 | from | Internal node key of the start node. |
System.Int32 | to | Internal node key of the end node. |
System.Int32[] | accessibleBy | The restriction keys used for routing purposes. |
System.Boolean | isHelperEdge | The flag indicating, that this edge was created by the system itself. |
System.Collections.Generic.IList<System.Int32> | shortcutPath | The path when this edge is used as a shortcut to reach To from From. |
Properties
| Improve this Doc View SourceAccessibleBy
Gets or sets the key value indicating who can pass
this edge when routing through the graph.
Declaration
public int[] AccessibleBy { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] |
Data
Holds additional information.
Declaration
public readonly IDictionary<string, object> Data { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |
From
Internal node key of the start node.
Declaration
public int From { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Geometry
The geometry positions describe the shape of the underlying edge path.
Declaration
public Position[] Geometry { readonly get; set; }
Property Value
Type | Description |
---|---|
Position[] |
GeometryLength
Gets the length collection indicating the length of each coordinate in the geometry.
Declaration
public int[] GeometryLength { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] |
IsHelperEdge
Gets or sets the flag, whether this edge is created by the SpatialGraph
to improve the connections between nodes (e.g, preventing sinks in the graph; no outgoing edges).
Declaration
public bool IsHelperEdge { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsShortcut
Gets or sets the flag indicating
Declaration
[IgnoreMember]
public readonly bool IsShortcut { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Key
Identifies this GraphData object within the same graph.
Declaration
public int Key { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Length
The total length of the edge in meter.
Declaration
public double Length { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ShortcutPath
Gets or sets the shortcut path to reach the To node.
Declaration
public IList<int> ShortcutPath { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.Int32> |
To
Internal node key of the end node.
Declaration
public int To { readonly get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceCompareTo(EdgeData)
Represents an edge in the SpatialGraph
Declaration
public int CompareTo(EdgeData other)
Parameters
Type | Name | Description |
---|---|---|
EdgeData | other |
Returns
Type | Description |
---|---|
System.Int32 |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current object. |
Overrides
System.ValueType.GetHashCode()
Implements
System.IComparable<T>