Discussion:
Zero Node
(too old to reply)
schoolie
2005-10-04 04:46:31 UTC
Permalink
Okay, now the only thing I don't understand is the ZeroNode. I can't
see how it is kept track of or how to find where it is. I am totally
missing the concept. I don't understand what the line in the
replaceZero function: place(2, new WeightedNode((byte)0, 0)); or why it
always returns 2. I see in the psuedo code that ai(i+1) (er something)
should be the right child result
of adding the two leaf 0 node children but it just doesn't make
sense.... I'm totally missing something.
schoolie
2005-10-04 05:41:17 UTC
Permalink
Post by schoolie
Okay, now the only thing I don't understand is the ZeroNode. I can't
see how it is kept track of or how to find where it is. I am totally
missing the concept. I don't understand what the line in the
replaceZero function: place(2, new WeightedNode((byte)0, 0)); or why it
always returns 2. I see in the psuedo code that ai(i+1) (er something)
should be the right child result
of adding the two leaf 0 node children but it just doesn't make
sense.... I'm totally missing something.
Mainly when a new character comes up and we need to output the zeroNode
how do we know what it is?

Loading...