ben519 / btree

binary tree structures as R data.table objects
2 stars 0 forks source link

make_btree error #1

Open ben519 opened 5 years ago

ben519 commented 5 years ago
make_btree(nodeIds=c(1,2,3), leftChildIds = c(1, NA, NA), rightChildIds = c(2, NA, NA))
   NodeId ParentNodeId LeftChildNodeId RightChildNodeId NodePath Depth
1:      1            1               1                2     <NA>    NA
2:      2            1              NA               NA     <NA>    NA
3:      3           NA              NA               NA              0

Notice the incorrect node path and depth

ben519 commented 5 years ago

Nvm. That should produce an error though.