Advertisement
Guest User

Untitled

a guest
May 6th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. If instance variable hasn't been set yet then the is the first ADAM Node 0.
  2.  
  3. 0: ADAM
  4.  
  5. All tree branches will have a tree limb ID (from each_with_index)
  6.  
  7. 0:0 0:1 0:2
  8. 0:0:0 & 0:0:1 0:1:0 0:2:0 & 0:2:1 & 0:2:2
  9. 0:0:0:1 0:0:0:2 & 0:0:1:0 0:1:0:0 0:2:2:0
  10. 0:0:0:2:0 0:0:1:0:0 0:1:0:0:0 & 0:1:0:0:1
  11.  
  12. (For simplicities sake since everyone starts with 0 we can leave it off and just start with
  13. a colon (:))
  14.  
  15. Each tree limb can by grouped by length to check and used to verify that the next record to
  16. duplicate isn't already in any of the tree branches further up. Any limb ID that's shorter
  17. in length is considered higher in the tree. Also any limbs on the same level that have been
  18. evaluated already should be checked as well.
  19.  
  20. Unfortunately this design with back-checking gets slower the further along it goes. It may
  21. be wise to created a Set of Record IDs per group of tree limb length. Easier access to the
  22. record for evaluation. Or even better just pool together all previously evaluated nodes into
  23. one set. That would make this much simpler but it will need a breadth tree algorithm. So
  24. maybe yes, maybe no.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement