[Haskell-beginners] Graph algorithms
.
ch.gosch at googlemail.com
Mon Jun 13 14:38:03 CEST 2011
Hello Haskellers,
I would like to implement a graph based algorithm, the sum-product
algorithm, in Haskell. I have looked at the FGL package, but I am not
sure whether this is really what I need.
For example, I need to know whether I am at a leaf (assuming the first
version I implement is the "original" algorithm which works for trees).
I would also need to store numerical values as well as functions
at nodes and edges. The FGL provides for "labels" at nodes and edges,
but these appear to have to be instances of classes such as Eq or Ord,
which does not work well for functions.
I could of course store node values and edge functions externally, e.g.
in a Map.
All this seems a bit awkward, but I may still just not have enough
experience in Haskell.
Can anyone give me a hint, or is there maybe even already a factor graph
implementation out there which I have missed?
Thanks,
Christian
More information about the Beginners
mailing list