Re: Is There a Java Class for this Kind of Data Structure?
Hal Vaughan <hal@thresholddigital.com> writes:
I checked out the Wikipedia article on acyclic directed graphs.
In some ways that is close to what I was doing.
I have not fully understood your text about those tables yet.
But since you mention graphs: I have a package in ram.jar that
is intended to store arbitrary graphs. It is intended for
knowledge representation. It still lacks a serialization format.
A small introduction into this package:
http://www.purl.org/stefan_ram/pub/de.dclj.ram.system.space
The ram.jar
http://www.purl.org/stefan_ram/pub/ram-jar
A special property of this system is that any arrow can also
be used as an anchor point for another arrow. So there might
be an arrow from an arrow to another arrow, or from an arrow
to a point.
Picture: A Graph with five string points A, B, C, D, and E,
two point-to-point arrows b and d,
an arrow-to-arrow arrow cd, and an
arrow-to-point arrow E.
A C
| |
| cd | e
|----------->|---------->E
| |
|b |d
v V
B D
The rightmost arrow ?e?, for example, might be used to label
the arrow ?d? to the left of it as ?E?.
This might also be used to implement relations with an arity
other than 2 by curryfication.
I still do not know, how such a graph (were arrows might start
or end at other arrows) is called.
The system is intended to support lookup by having each point
know about all its inarrows and it outarrows, so one can
easily enumerate them.