Yog.FSharp
Getting Started Examples API Reference GitHub

Path<'e> Type

Represents a computed path through a graph along with its total weight.

Type Parameters

  • 'e: The edge weight type

Fields

  • Nodes: List of NodeIds from source to target (inclusive)
  • TotalWeight: Sum of edge weights along the path

Example

1: 
2: 
// Path from node 0 to node 3 with total distance 42
let path = { Nodes = [0; 2; 3]; TotalWeight = 42 }
val path: 'a

Record fields

Record Field Description

Nodes

Full Usage: Nodes

Field type: NodeId list

Ordered list of node IDs from source to target (inclusive).

Field type: NodeId list

TotalWeight

Full Usage: TotalWeight

Field type: 'e

Total weight/cost of traversing this path.

Field type: 'e