Re: level

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 22 Nov 2003 19:56:53 -0800
Message-ID: <c7ec22df.0311221956.44336486_at_posting.google.com>


Vadim Tropashko <vadimtro_at_yho.cm> wrote in message news:<T8hsb.30$Up4.151_at_news.oracle.com>...
> That's right, there seem to be no simple identity involving level:-(

Actually,

level = log(1 - y/x)

or, equivalently,

level = log(1-lft/rgt)

Note, that Celko Nested Sets model have nice agregated formula for descendants

number_of_descendants = (rgt-lft+1)/2

while don't have any formula for the level. In binary rational nested intervals encoding the situation is completely reverse: there couldn't be any identity for descendants, because tree is allowed to grow without changing node labels. Received on Sun Nov 23 2003 - 04:56:53 CET

Original text of this message