Difference between revisions of "Specification:Count Ancestors"
m (Sam888 moved page Count Ancestors to Specification:Count Ancestors: related to development eg: GEPS)
Revision as of 05:54, 27 October 2014
Count Ancestors Specification
- Added to Gramps as the Number of Ancestors Report
style="width:235px; line-height:2.25em; font-size:90%;" align=right
The Count Ancestor report counts ancestors of a particular person and shows them on screen in a Dialog. Starting with the Active Person, each generation is traced.
The report consists of three sections, the view title, the generations, and a summary.
The Dialog will be titled "Ancestors of <NAME>", where <NAME> is the name of the active person. It is determined by the display settings of GRAMPS, this is typically "Firstname Lastname".
Each generation is listed preceding the Active Person. The Active Person will be the only person in "Generation 1".
For every generation there is an entry, listing the genaration number and the amount of people of the generation present in GRAMPS
The last line gives an overview from generation 2 to the last generation know.
Individual Generation Contents
Each entry will consist of a single line, and should contain the following contents:
- Generation number.
- Number of persons on this generation.
- Percentage of people from the theorical number of persons for this generation.
The theoretical number is calculated as follows: Each person has two natural parents, so every genaration can contain theoretically 2 times the number of people in the previeous generation, eg. Generation 4 can contain 2xGeneration 3 = 2x2x2x1. The percentage is hence
theoretical = pow(2, ( gen - 1 ) ) percentage = number_people_in_generation / theoretical * 100
The total number of people present in GRAMPS for generation 2 up to the last generation registred is calculated, and presented, together with the percentage it is of the theoretically possible number of people. The percentage that the in GRAMPS registered persons form of the total number of people possible for generation 2 up to the last generation is calculated
for generation 2 to last : total_gen += number_people_in_generation total_theoretical += pow(2, ( generation - 1 ) ) total_percent = total_gen / total_theoretical * 100
A sample entry should look as below:
Ancestors of "Smith, Edwin Michael"
generation 1 has 1 individual (100%)
generation 2 has 2 individuals (100%)
generation 3 has 2 individuals (50%)
Total ancestors in generation 2 to 7 is 12 (9.52%)
No report options