Page 1 of 1

How to save a tree in memory to disk

PostPosted: Jul 9, 2002 @ 11:54am
by kaiton

PostPosted: Jul 9, 2002 @ 12:32pm
by BurningSheep

PostPosted: Jul 9, 2002 @ 1:06pm
by refractor
(Beware, rambling coder text ahead)

I'd be tempted to work out a data structure to store the suffix trie / patricia trie in a structure that didn't rely on actual pointers (i.e. make it so it can be referenced from where-ever it is loaded into memory ... relocatable).

That way you can just build the data structure once, dump it to disk, then re-load it and use that. The interesting part will be working out how to then add to it (I'm assuming you'll need to).

Have you thought about using bit-sets at each trie node rather than a series of pointers? It'll be far more compact in memory if you can do that.

Have a look at this:



And see if it helps any.

( is *great* for research like this since the the other reference site went belly-up .. can't even remember what that one was called now).

Cheers,

Refractor

PostPosted: Jul 9, 2002 @ 7:02pm
by kaiton
He Refractor!

That site is great!
Thanks!