genealogy

Detect cycles in a genealogy graph during a Depth-first search

浪子不回头ぞ 提交于 2019-12-03 07:44:33
I'm loading horse genealogical data recursively. For some wrong sets of data my recursion never stops... and that is because there are cycles in the data. How can I detect those cycles to stop recurring? I thought of while recurring maintain a hashTable with all "visited" horses. But that will find some false positives, because a horse CAN be twice in a tree. What cannot happen is that a horse appear as a father or grandfather or great grandfather of ITSELF. Pseudo code: void ProcessTree(GenTreeNode currentNode, Stack<GenTreeNode> seen) { if(seen.Contains(currentNode)) return; // Or, do

Rendering a dynamically created family graph with no overlapping using a depth first search?

扶醉桌前 提交于 2019-12-03 05:28:34
问题 I want to generate this: With this data structure (ids are random, btw not sequential): var tree = [ { "id": 1, "name": "Me", "dob": "1988", "children": [4], "partners" : [2,3], root:true, level: 0, "parents": [5,6] }, { "id": 2, "name": "Mistress 1", "dob": "1987", "children": [4], "partners" : [1], level: 0, "parents": [] }, { "id": 3, "name": "Wife 1", "dob": "1988", "children": [5], "partners" : [1], level: 0, "parents": [] }, { "id": 4, "name": "son 1", "dob": "", "children": [],

Calculate Family Relationship from Genealogical Data

你说的曾经没有我的故事 提交于 2019-12-03 03:14:15
问题 I would like to be able to calculate the family relationship between two individuals in a family tree, given the following data schema (simplified from my actual data schema, only showing columns that directly apply to this problem): individual ---------- id gender child ---------- child_id father_id mother_id With this structure, how can one calculate the relationship between two individual id's (i.e. cousin, great grand uncle, etc.). Also, as there are actually two relationships (i.e. A-B

Rendering a dynamically created family graph with no overlapping using a depth first search?

随声附和 提交于 2019-12-02 17:51:23
I want to generate this: With this data structure (ids are random, btw not sequential): var tree = [ { "id": 1, "name": "Me", "dob": "1988", "children": [4], "partners" : [2,3], root:true, level: 0, "parents": [5,6] }, { "id": 2, "name": "Mistress 1", "dob": "1987", "children": [4], "partners" : [1], level: 0, "parents": [] }, { "id": 3, "name": "Wife 1", "dob": "1988", "children": [5], "partners" : [1], level: 0, "parents": [] }, { "id": 4, "name": "son 1", "dob": "", "children": [], "partners" : [], level: -1, "parents": [1,2] }, { "id": 5, "name": "daughter 1", "dob": "", "children": [7],

Genealogy tree Algorithm

女生的网名这么多〃 提交于 2019-11-30 16:21:46
问题 I'm new in this domain and like to write an application managing genealogical data. My main concern is how to store and retreive these data from MySQL. I know that DB like Oracle are optimised for recursive queries, but maybe I can find an alternative solution to use MySQL which I undestand is not supporting "CONNECT" . PS. I know that there are thousands of existing Open source solutions, but consider that these data will be a limited part of the functionality, and I need to keep control of

Genealogy tree Algorithm

荒凉一梦 提交于 2019-11-30 16:08:43
I'm new in this domain and like to write an application managing genealogical data. My main concern is how to store and retreive these data from MySQL. I know that DB like Oracle are optimised for recursive queries, but maybe I can find an alternative solution to use MySQL which I undestand is not supporting "CONNECT" . PS. I know that there are thousands of existing Open source solutions, but consider that these data will be a limited part of the functionality, and I need to keep control of the full code. I had a quick look on the web and found some interesting approach, for instance Interval

Genealogy Tree Control [closed]

可紊 提交于 2019-11-30 13:14:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I've been tasked (by my wife) with creating a program to allow her to track the family trees on both sides of our family. Does anyone know of a cost-effective (free) control to represent this type of information? What I'm looking for is a modified org-chart type chart/tree. The modification is that any node

Gedcom Reader for C#

元气小坏坏 提交于 2019-11-30 13:03:28
问题 Does anyone know of a good class to read in .ged files Gedcom is a file format that is used to store genealogical information. My goal is to write something that would let me import a ged file and export a .dot file for graphviz so that I can make a visual representation of a family tree thanks if you can help 回答1: Heres my best attempt so far. It seems to be working for what i need though its defiently not full proof ( then again my family tree is rather large and that adds some complexity)

How can I prevent overlapping in a family tree generator?

不羁岁月 提交于 2019-11-30 11:09:14
I'm creating an interactive family tree creator, unlike more simpler versions which are simple pedigree charts/trees. The requirements for mine (based on familyecho.com) are: multiple partners vs just a simple 2 parent to 1 child that you normally see. multiple siblings partners dont necessarily need to have children there doesn't always have to be a parent "pair", there can just be a single father/mother The problem I'm encountering is: I'm generating the offsets based on the "current" node/family member and when I go past the first generation with say, 2 parents, it overlaps. Example of the

Genealogy Tree Control [closed]

六眼飞鱼酱① 提交于 2019-11-30 06:53:00
I've been tasked (by my wife) with creating a program to allow her to track the family trees on both sides of our family. Does anyone know of a cost-effective (free) control to represent this type of information? What I'm looking for is a modified org-chart type chart/tree. The modification is that any node should have 2 parent nodes (E.G. a child should have a Mother/Father). The solution I've come up with so far is to have 2 trees, an ancestor tree and a descendants tree, with the individual being inspected as the root node for each tree. It works but is sort of clunky. I'm working primarily