opencog-dev team mailing list archive
-
opencog-dev team
-
Mailing list archive
-
Message #00312
new tree data structure library released
I am happy to report that the treetree library has just been released
under the Apache 2.0 license - you can get it at
http://code.google.com/p/treetree/ .
This is a small but useful component for anyone attempting
Novamente/OpenCog-style development in C++ - it provides an STL-style
n-ary tree class that can be used to represent and transform programs
in an interpreted language, decision trees, node-and-link fragments,
rewrite rules, s-expressions, etc. It is based on about five years
experience with both bespoke and generic solutions to this problem,
and is hopefully both convenient and safe.
So if you are ever tempted to do
class MyTree { std::vector<MyTree*> children; ...
don't! Use treetree instead!
All comments/critiques appreciated...
Cheers,
Moshe Looks
P.S Thanks to Ari Heljakka for some design suggestions, and to Google
for patronage and permission to release the code...
Follow ups