From: Alex R. <sh...@al...> - 2005-01-02 05:33:22
|
Adam, On Sat, Jan 01, 2005 at 11:35:46PM -0500, Adam Stein wrote: > I'm using the GenericFilter class to run filters on the database (from a= =20 > programming level). I get back a list of people that match the filter=20 > (obviously). Is there anyway to determine what generation an individual= =20 > is in (assuming the first person in the list is generation 0)? It seems= =20 > that all the report plugins do the filtering themselves so that they can= =20 > get this information rather than use the GenericFilter class. The problem with generation numbers is that they only make sense within a single family line. More specifically, if two people have a common ancestor then one can assign some meaningful generation numbers. The GenericFilter is not limited to people with common ancestors. For example, I can create a filter matching women. For that list (i.e. the list of all women) assigning generation numbers is problematic -- some of them may be unrelated and then we're stuck without an objective criterion: birth date? death date? high school graduation date? That said, nothing prevents us from writing generic find_all_ancestors() and find_all_descendants() functions so that all reports can use them (place them somewhere in e.g. Utils). These would be recursive functions going from a person to its ancestors/descendants untill the end of the data. Not sure if this completely answers your questions :-) Alex --=20 Alexander Roitman http://ebner.neuroscience.umn.edu/people/alex.html Dept. of Neuroscience, Lions Research Building 2001 6th Street SE, Minneapolis, MN 55455 Tel (612) 625-7566 FAX (612) 626-9201 |