Specification:Count Ancestors

From Gramps
(Redirected from Count Ancestors)
Jump to: navigation, search

Count Ancestors Specification


Task Status
Specification draft draft
Approval obtained
Implementation finished

Introduction

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.


Example/Screenshot

Count ancestors.png

Specification

View Sections

The report consists of three sections, the view title, the generations, and a summary.

View Title

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".

Generation Section

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

Summary Section

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

Summary Contents

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


Sample Entry

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%)


Report Options

No report options