//Creating a list of labeled vertices
let vertexList : LVertex<int,string> list =
List.init 4 (fun i ->
i,
sprintf "VertexNr. %i" i)
Since basic collections in F# are 0-based, the resulting verteces will have index 0 to 3, but the adjacency graph needs 1-based verteces. Otherwise they are omitted on creation.
Correct:
//Creating a list of labeled vertices
let vertexList : LVertex<int,string> list =
List.init 4 (fun i ->
i + 1,
sprintf "VertexNr. %i" (i + 1))
Found a problem with existing documentation?
Since basic collections in F# are 0-based, the resulting verteces will have index 0 to 3, but the adjacency graph needs 1-based verteces. Otherwise they are omitted on creation. Correct:
Edit: Error not reproducible.