## Re: [Gramps-devel] Re: Relationship Calculator prone to unmanagibility?

 Re: [Gramps-devel] Re: Relationship Calculator prone to unmanagibility? From: Alex Roitman - 2003-10-15 20:54:59 Attachments: Message as HTML ```On 2003.10.14 04:26, Lorenzo Cappelletti wrote: > No father/mother/sister/brother/niece/nephew functions. A language =20 > might use a different word for the father of a son or a daughter. =20 > Then, each rel_??.py should provide one and only one function which =20 > returns a string expressing the relationship between individuals A =20 > and B. =20 Yay! Thank you, that was exactly the goal behind having language-=20 dependent rel calc functions :-)=20 > Language programmer should be given all the necessary pieces of=20 > information as to correctly determine the relationship: individual A=20 > (along with gender), individual B, A's level, B's level, and common=20 > ancestor list. I agree with that. > A possible function prototype would be: >=20 > getRelationshipString(Person.a, Person.b, integer.aLevel,=20 > integer.bLevel, list.commonAncestors) >=20 > Here Alex is right. There'll be some redundancy: languages which > computes a relationship in a common way will have the same, cloned > if-statement test. But that's the (small) price we have to pay for > comprehensivness. (Note that spouse relationship is an exception to=20 > this function.) Seems like a good idea too. > Now that I think more about it, why a list of ancestors? If there's =20 > a consanguinity between two people, should there be just one common =20 > ancestor? Mmhhh... =20 > > The fact is that an individual gets birth from a family, not from two=20 > individuals. The, our function is: >=20 > getRelationshipString(Person.a, Person.b, integer.aLevel,=20 > integer.bLevel, Family.commonFamily) >=20 > This way, spouse relationship is no longer an exception. If aLevel=3D0= =20 > and bLevel=3D0, a is a spouse of b. Sounds very good to me. Any other opinions, anybody? Lorenzo, if you'd like to implement this it would be great. If not, let =20 me know and I'll have a go at this. Should not be too hard to do. 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 ```