bio-nim / nim-networkx

[WIP] Nim port of (a subset of) the pure-Python networkx library
8 stars 3 forks source link

API discussions #4

Open cdunn2001 opened 8 years ago

cdunn2001 commented 8 years ago

The API may evolve. We can bounce ideas around here.

cdunn2001 commented 8 years ago

One idea is to use [Node, Edge] generics everywhere. Then, users can apply whatever attributes they see fit. In C++, templates compile slowly, but Nim compiles generics fast. So I am leaning toward this.

Another idea is to use integers for nodes and let the user keep a hash-table. That's a bit less convenient (though less noisy) but extremely efficient. It would also keep our library simple, which is important for any open-source project. Integer-length might be a compile-time option.