Repro steps
open FSharp.FGL.Undirected
let rnd = System.Random()
let myGraph =
FSharp.FGL.Directed.Models.gilbert (fun i -> i,i) 4 0.3
|> FSharp.FGL.Directed.Edges.undirect (fun _ _ -> 1)
myGraph
|> Edges.map (fun _ _ _ -> rnd.NextDouble())`
Expected behavior
Edge from 0 -> 1 and 1 -> 0 should have the same weights
Actual behavior
Edge from 0 -> 1 and 1 -> 0 have the different weights
Solution
The function should only be applied once and the value should be used for both "directions"