fslaborg / Graphoscope

A pragmatic approach to network science.
http://fslab.org/Graphoscope/
MIT License
14 stars 6 forks source link

loopcount for DiGraph does not work #43

Open general-rishkin opened 1 year ago

general-rishkin commented 1 year ago

The following code to obtain the loop count of a digraph fails. none of the suggestions from the error words. the FGraph version works fine.

let mutable lg: DiGraph<int, float> = 
  DiGraph.createFromEdges [| (0, 2, 1.0); (0, 1, 1.0)|]
  |> DiGraph.addEdge (1, 2, 1.0)
  |> DiGraph.addEdge (0, 1, 1.0)

Measures.Loop.loopCount lg

typecheck error Value restriction. The value 'it' has been inferred to have generic type val it: '_a Either define 'it' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation.