You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In section 16.4.2.3 Hierarchical Transformation (p233), the first code sample is missing a curly braces between line 8 and 9 to close off the else statement:
1 node = root;
2 while (!node.isLeaf) {
3 if (u < node.probLeft) {
4 u /= node.probLeft;
5 node = node.left;
6 } else {
7 u /= (1.0 - node.probLeft);
8 node = node.right;
9 }
10 // Ok. We have found a leaf with the correct probability!
Should be:
1 node = root;
2 while (!node.isLeaf) {
3 if (u < node.probLeft) {
4 u /= node.probLeft;
5 node = node.left;
6 } else {
7 u /= (1.0 - node.probLeft);
8 node = node.right;
9 } <<<<<<<<<<<<<<<<<<<<< Missing this
10 }
11 // Ok. We have found a leaf with the correct probability!
The text was updated successfully, but these errors were encountered:
In section 16.4.2.3 Hierarchical Transformation (p233), the first code sample is missing a curly braces between line 8 and 9 to close off the else statement:
Should be:
The text was updated successfully, but these errors were encountered: