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