mirror of https://github.com/zcash/zips.git
Clarify explanations in Background section
This commit is contained in:
parent
bf159d1221
commit
f503789adf
13
zip-0221.rst
13
zip-0221.rst
|
@ -76,7 +76,7 @@ This leaves us with three subtrees ("mountains") of altitudes 3, 1, and 0:
|
|||
/\/\/\/\ /\ /
|
||||
|
||||
Note that the first leftmost peak is always the highest. We can number this structure in
|
||||
order of insertion:
|
||||
the order by which nodes would be created, if the leaves were inserted from left to right:
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
|
@ -107,16 +107,19 @@ find the subtree roots ("peaks") of the mountains.
|
|||
Once we have the positions of the mountain peaks, we "bag" them using the following
|
||||
algorithm:
|
||||
|
||||
1. add a peak connecting the 2 left-most peaks
|
||||
2. repeat 1. until we have a single peak
|
||||
1. Generate a node connecting the 2 left-most peaks, forming a new peak
|
||||
2. Repeat 1. until we have a single peak
|
||||
|
||||
Note that the extra nodes generated during the bagging process do not follow the above
|
||||
rules for jumping between nodes.
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
Altitude
|
||||
|
||||
5 20
|
||||
5 20g
|
||||
/ \
|
||||
4 19 \
|
||||
4 19g \
|
||||
/ \ \
|
||||
/ \ \
|
||||
/ \ \
|
||||
|
|
Loading…
Reference in New Issue