Hello all,
I was wondering if anyone was working on a graph library for Nim? Either as a wrapper to an existing library or as a pure one ?
I saw a thread on this (http://forum.nim-lang.org/t/961#5784) and I remember there was sample code from someone on the list ?
I take this opportunity to thank the Nim community and its contributors for their good work. Nim is really nice. I am still in the learning process but I enjoy it so far.
regards, Pascal
What do you mean by a graph library? What are your expectations? I think any data structure could be interpreted as some kind of graph. If your claims are just about simplicity, I can write you one here in this post:
type
GraphNode[T] = object
data: T
outTransitions: seq[ref GraphNode]
Graph[T] = object
nodes: seq[ref GraphNode[T]]
Hello.
I have to admit I may have been a bit vague. I agree with you on the fact that datastructures are some kind of graph. I would even say they are a particular case of a more general graph (e.g. lists, trees ...)
I am simply searching for a more elaborate one including common graph algorithms, properties support on nodes and edges, linked list versus sparse memory storage ... (intsets) + some APIs for querying/updating ...
Pascal