Show / Hide Table of Contents

Class PathSegment<TIdType>

Linked list of routed vertices.

Inheritance
System.Object
PathSegment<TIdType>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class PathSegment<TIdType>
Type Parameters
TIdType

Constructors

PathSegment(TIdType)

Creates a vertex not linked to any others.

Declaration
public PathSegment(TIdType vertexId)
Parameters
TIdType vertexId

PathSegment(TIdType, Double, PathSegment<TIdType>)

Creates a new linked vertex.

Declaration
public PathSegment(TIdType vertexId, double weight, PathSegment<TIdType> from)
Parameters
TIdType vertexId

System.Double weight

PathSegment<TIdType> from

Properties

From

The vertex that came before this one.

Declaration
public PathSegment<TIdType> From { get; set; }
Property Value
PathSegment<TIdType>

VertexId

The id of this vertex.

Declaration
public TIdType VertexId { get; set; }
Property Value
TIdType

Weight

The weight from the source vertex.

Declaration
public double Weight { get; set; }
Property Value
System.Double

Methods

Clone()

Returns an exact copy of this path segment.

Declaration
public PathSegment<TIdType> Clone()
Returns
PathSegment<TIdType>

ConcatenateAfter(PathSegment<TIdType>)

Concatenates this path after the given path.

Declaration
public PathSegment<TIdType> ConcatenateAfter(PathSegment<TIdType> path)
Parameters
PathSegment<TIdType> path

Returns
PathSegment<TIdType>

ConcatenateAfter(PathSegment<TIdType>, Func<TIdType, TIdType, Int32>)

Concatenates this path after the given path.

Declaration
public PathSegment<TIdType> ConcatenateAfter(PathSegment<TIdType> path, Func<TIdType, TIdType, int> comparer)
Parameters
PathSegment<TIdType> path

Func<TIdType, TIdType, System.Int32> comparer

Returns
PathSegment<TIdType>

Equals(PathSegment<TIdType>)

Returns true if the given object equals this one.

Declaration
protected bool Equals(PathSegment<TIdType> other)
Parameters
PathSegment<TIdType> other

Returns
System.Boolean

Equals(Object)

Returns true if the given object equals this one.

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

Overrides
System.Object.Equals(System.Object)

First()

Returns the first vertex.

Declaration
public PathSegment<TIdType> First()
Returns
PathSegment<TIdType>

GetHashCode()

Returns the hashcode for this object.

Declaration
public override int GetHashCode()
Returns
System.Int32

Overrides
System.Object.GetHashCode()

Length()

Returns the length.

Declaration
public int Length()
Returns
System.Int32

Reverse()

Returns the reverse of this path segment.

Declaration
public PathSegment<TIdType> Reverse()
Returns
PathSegment<TIdType>

ToArray()

Returns all the vertices in an array.

Declaration
public TIdType[] ToArray()
Returns
TIdType[]

ToArrayWithWeight()

Returns all the vertices in an array along with their respective weight.

Declaration
public Tuple<TIdType, double>[] ToArrayWithWeight()
Returns
Tuple<TIdType, System.Double>[]

ToString()

Returns a description of this path.

Declaration
public override string ToString()
Returns
System.String

Overrides
System.Object.ToString()

Operators

Equality(PathSegment<TIdType>, PathSegment<TIdType>)

Returns true if the path is the samen.

Declaration
public static bool operator ==(PathSegment<TIdType> segment1, PathSegment<TIdType> segment2)
Parameters
PathSegment<TIdType> segment1

PathSegment<TIdType> segment2

Returns
System.Boolean

Inequality(PathSegment<TIdType>, PathSegment<TIdType>)

Returns true if the path is the samen.

Declaration
public static bool operator !=(PathSegment<TIdType> segment1, PathSegment<TIdType> segment2)
Parameters
PathSegment<TIdType> segment1

PathSegment<TIdType> segment2

Returns
System.Boolean

Back to top Built by Itinero, MIT licensed.