Perl has a number of modules dealing with graphs -
perhaps some useful code could be garnered by looking
at modules such as
http://www.cpan.org//authors/id/N/NE/NEILB/ where the
author has a collection of
modules for reading and writing directed graphs in a
variety of formats.
Logged In: YES
user_id=75003
Also note GraphViz @ http://www.graphviz.org/
Particularly interesting are "tclgdr" and "tclgdl"
for the manipulation and layouting of graph
structures. tcllib/struct/graph api compatible
wrapper would be nice and also give as the capability
to read and write DOT, the language of GraphViz.
Logged In: YES
user_id=302287
I'm currently looking into coding a c version to reduce
memory consumption and speed (i like the tcllib interface,
but it is a bit slow using 150 000 + Nodes...), perhaps
there are some ideas how this could be done. Any help
appreciated.
Logged In: YES
user_id=75003
Whow, there do you use 150 000+ nodes ?
Seriously. We have a command per graph. The implementation
(= C function) of this command should be shared, and be
given a reference to the actual graph structure during
registration as true tcl command (ClientData of tcl
commands!). In the shared implementation cast the incoming
clientdata into the correct pointer to the graph structure
and then just use it.
nodes, arcs. Use hashtables to map from node and arc names
to the structures hold information about them. Interlink
these structure. For example an arc structure should
contain references to the two nodes the arc is connected
too. Same for node structures, should have references to
all incoming and outgoing arcs. Possibilities here are
dynamically allocated arrays, linked lists, hash tables,
Tcl_Obj => list functionality.
A C implementation would be great.
Logged In: YES
user_id=75003
there do you = where do you
Logged In: YES
user_id=75003
More notes:
* Structure the system in two layers
- Actual graph handling layer
- Glue between that and Tcl
* Investigate existing C coded graph layers, reduce effort
by having to write only the glue layer.
- http://www.graphviz.org
- The implementation provided "The Stanford Graphbase"
(http://www.amazon.de/exec/obidos/ASIN/0201542757/)
- http://www.informatik.uni-bremen.de/daVinci/
... more
Logged In: YES
user_id=302287
I have finished a c coded version of the tcllib 1.3 version.
It can be found at:
http://purl.oclc.org/NET/schlenk/tcl/cgraph
Michael
Logged In: YES
user_id=75003
Raising the priority of the item because its inclusion in the
upcoming release was proposed in the Tcllib-devel mailing list.
Supporting or contrarian statements should be made on the
referenced mailing list for public discussion.