JustCarmen / webtrees-fancy-treeview

Fancy Treeview Module for webtrees
http://justcarmen.nl
GNU General Public License v3.0
21 stars 9 forks source link

Number of ancestors should be recalculated in case of a pedigree collapse #106

Closed hartenthaler closed 1 year ago

hartenthaler commented 1 year ago

I selected the new option to show if the husband and his wife are blood-related. But this is not indicated in the text (see enclosed example).

If there is a pedigree collapse there are not as many ancestors in a generation as theoretically are possible. In the enclosed example there are only 4 different persons in generation 4. But there it is written "8 of 8 individuals (100% complete)."; it should be "4 of 8 individuals (100% complete because of pedigree collapse)."

Screenshot (134)

JustCarmen commented 1 year ago

I selected the new option to show if the husband and his wife are blood-related. But this is not indicated in the text (see enclosed example).

My mistake. This function is inherited from the webtrees 1 version of this module and is only available in the descendants view. Because the descendants view contains relationship (marriage) details and the ancestors view does not. I have updated the help text.

JustCarmen commented 1 year ago

If there is a pedigree collapse there are not as many ancestors in a generation as theoretically are possible. In the enclosed example there are only 4 different persons in generation 4. But there it is written "8 of 8 individuals (100% complete)."; it should be "4 of 8 individuals (100% complete because of pedigree collapse)."

I don't understand this and I can't reproduce this. What do you mean by pedigree collapse?

hartenthaler commented 1 year ago

What do you mean by pedigree collapse?

The explanation in the dutch Wikipedia is very short: Kwartierherhaling. But maybe you can follow the links there to other Wikipedia languages.

As you can see in my example the parents of Alfonso de Borbón XII are double cousins. So he had only 4 great-grandparents. This is called pedigree collapse. This happens normally not in the first four generations but it happens in each tree for everybody if you go back to earlier generations.

In your report, there is written "8 of 8 persons (100% complete)" but only 4 persons are shown. The 4 shown persons are ok. 100% complete is ok because all the ancestors are shown, and nobody is missed. The "8" in "8 of" is wrong because there are only 4 persons possible in this case. So it should be "4 of". Now about the second number: there are two alternative ways how to comment:

I hope that helps.

JustCarmen commented 1 year ago

Yes, this helps. Your explanation is very clear and the Dutch translation correct. But it means my simple calculation method to determine the maximum number of individuals in each generation (2 to the power of n, where n is the number of generation - 1) is not working in cases like this.

I've now found a similar situation in my own Gedcom, so I've been able to reproduce this.

I need to find a way to calculate it correctly in this situation. Not only the generation where the pedigree collapse first occurs is calculated incorrectly, but all subsequent generations must be recalculated.

JustCarmen commented 1 year ago

This one gave me headaches, but I think I solved it.

In case of a pedigree collapse, the maximum number of ancestors is recalculated from the generations in which it first occurs. It is possible to have multiple situations of a pedigree collapse. All of those are taken into account.

I choose to add the extra information in a tooltip to keep the text page as clean as possible.

In the ancestor view, the text is only shown if the "check relationship between partners" option is set to "yes." I removed it from the default view because it takes up more memory.