Class EdgeExtensions
Contains extensions related to edges, edge id's and directed edges.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public static class EdgeExtensions
Methods
DirectedEdgeId(Graph.EdgeEnumerator)
Returns a directed version of the edge-id. Smaller than 0 if inverted, as-is if not inverted.
Declaration
public static DirectedEdgeId DirectedEdgeId(this Graph.EdgeEnumerator enumerator)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
Returns
|
DirectedEdgeId
|
Remarks
The relationship between a regular edge id and a directed edge id:
- 0 -> 1 forward, -1 backward.
- all other id's are offset by 1 and postive when forward, negative when backward.
GetSourceVertex(Graph.EdgeEnumerator, Int64)
Gets the source vertex.
Declaration
public static uint GetSourceVertex(this Graph.EdgeEnumerator enumerator, long directedEdgeId)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
System.Int64
directedEdgeId
|
Returns
|
System.UInt32
|
GetTargetVertex(Graph.EdgeEnumerator, Int64)
Gets the target vertex.
Declaration
public static uint GetTargetVertex(this Graph.EdgeEnumerator enumerator, long directedEdgeId)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
System.Int64
directedEdgeId
|
Returns
|
System.UInt32
|
GetWeight(Graph.EdgeEnumerator, Func<UInt16, Factor>)
Gets the weight for the current edge.
Declaration
public static float GetWeight(this Graph.EdgeEnumerator enumerator, Func<ushort, Factor> getFactor)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
Func<System.UInt16, Factor>
getFactor
|
Returns
|
System.Single
|
GetWeight(Graph.EdgeEnumerator, Func<UInt16, Factor>, out Int16)
Gets the weight for the current edge.
Declaration
public static float GetWeight(this Graph.EdgeEnumerator enumerator, Func<ushort, Factor> getFactor, out short direction)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
Func<System.UInt16, Factor>
getFactor
|
|
System.Int16
direction
|
Returns
|
System.Single
|
GetWeight(Graph.EdgeEnumerator, Int64, Func<UInt16, Factor>)
Gets the weight for the given edge.
Declaration
public static float GetWeight(this Graph.EdgeEnumerator enumerator, long edge, Func<ushort, Factor> getFactor)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
System.Int64
edge
|
|
Func<System.UInt16, Factor>
getFactor
|
Returns
|
System.Single
|
GetWeight(Graph.EdgeEnumerator, Int64, Func<UInt16, Factor>, out Int16)
Gets the weight for the given edge.
Declaration
public static float GetWeight(this Graph.EdgeEnumerator enumerator, long directedEdgeId, Func<ushort, Factor> getFactor, out short direction)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
System.Int64
directedEdgeId
|
|
Func<System.UInt16, Factor>
getFactor
|
|
System.Int16
direction
|
Returns
|
System.Single
|
IdDirected(Edge)
Returns a directed version of the edge-id. Smaller than 0 if inverted, as-is if not inverted.
Declaration
public static long IdDirected(this Edge edge)
Parameters
|
Edge
edge
|
Returns
|
System.Int64
|
Remarks
The relationship between a regular edge id and a directed edge id:
- 0 -> 1 forward, -1 backward.
- all other id's are offset by 1 and postive when forward, negative when backward.
IdDirected(Graph.EdgeEnumerator)
Returns a directed version of the edge-id. Smaller than 0 if inverted, as-is if not inverted.
Declaration
public static long IdDirected(this Graph.EdgeEnumerator enumerator)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
Returns
|
System.Int64
|
Remarks
The relationship between a regular edge id and a directed edge id:
- 0 -> 1 forward, -1 backward.
- all other id's are offset by 1 and postive when forward, negative when backward.
MoveToEdge(Graph.EdgeEnumerator, Int64)
Moves to the given directed edge-id.
Declaration
public static void MoveToEdge(this Graph.EdgeEnumerator enumerator, long directedEdgeId)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
System.Int64
directedEdgeId
|
MoveToTargetVertex(Graph.EdgeEnumerator, Int64)
Moves this enumerator to the target vertex of the given directed edge-id.
Declaration
public static void MoveToTargetVertex(this Graph.EdgeEnumerator enumerator, long directedEdgeId)
Parameters
|
Graph.EdgeEnumerator
enumerator
|
|
System.Int64
directedEdgeId
|