Re: yet another hierarchy model
Date: 25 Oct 2001 00:04:26 -0700
Message-ID: <bdf69bdf.0110242304.1c0e69b_at_posting.google.com>
kwillets_at_looksmart.net (KWillets) wrote in message news:<eef24980.0110161354.7eb13a84_at_posting.google.com>...
> Vadim Tropashko <nospam_at_newsranger.com> wrote in message news:<Urmx7.24985$ev2.33971_at_www.newsranger.com>...
> > Here is one more way to represent hierarchy: just store depth-first sequence
> > number and level (simple, indeed!).
> >
> (...until one needs to delete or insert a node.)
>
> How about:
>
> 1. Assigning unique prime numbers to all leaf nodes, and assigning
> each intermediate node the product of its subordinates.
>
<snip>
>
> This kind of thing can go on and on....
Indeed. Here are 2 more methods:
- Modified Celko's nested sets:
. (1,1) . / | \ . / | \ . / | \ . (1,3)(2,2)(3,1) . \ . \ . (4,1)
(i,j) is a child of (k,l) iff i>=k and j>=l
2. Inverted Willets' division lattice
. 1 . /|\ . / | \ . / | \ . / | \ . 2 3 5 . /|\ /|\ . 4 6 8/ | \ . / | \ . 9 15 21
In multiples of the node '3' we omit multiples of the node '2'.
Looks like any partial order would do. Received on Thu Oct 25 2001 - 09:04:26 CEST