Closed Lumphie closed 7 years ago
//Test graph 20 When 2 indivs mate and get 2 kids (generation 0, grandmother with grandfather --> father, mother) one dies (i.e. grandmother is left with father and mother) Grandmother, father and mother go to generation 1. Father becomes species 1 and grandmother + mother become species 2 (reconstructed should be both species 1) Grandmother gets a child (daughter) and father gets a child (son), both go in species 3 (reconstructed 2)
//Test graph 21 Generation 0: Grandfather and grandmother, grandfather gets a child (father) with grandmother, grandfather dies. Generation 1: Grandmother gets a child (mother) and father (son) gets a child. Both die. Generation 2: Mother and son get into one species.
Maybe Graph 20 can be fixed if we decide to only look at mother (because the females always die after mating) for inheritance. Fathers don't die and are then able to move in the same species as their children. Not sure if we want that.
Graph 21 gives edges that skips generations, that should just be filtered out when creating a reconstructed tree.
There is a mismatch between the ASCII art in the documentation and in the Boost.Graph for graph 20:
Whoops. Forgot to chance the ascii art there. The png is right.
So the correct ASCII would be like below?
/*
[3] [2]
/ | \ | \
/ | \ | \
| [1]--[2] -> [1] |
\ | / | /
\ | / | /
[0] [0]
*/
/*
[3] [2]
/ | \ |
/ | \ |
| [1]--[2] -> [1]
\ | / |
\ | / |
[0] [0]
*/
Thanks! I'll fix it in the code.
In determining the reconstructed tree, if I remove all edges that span multiple generations, the tests will pass.
Easier test passes, harder test doesn't yet:
Next stop: remove the self-loops :-)
@Lumphie : done :sunrise: :rainbow_flag:
Wanna check my work?
Looks good
sado_merge_two_species_graph_20 & sado_merge_two_species_graph_21 both add something that can happen in overlapping generations (one of your parents in the same generation as you are and parents having children that are more than one generation away)