comp.lang.ada
 help / color / mirror / Atom feed
From: Mart van de Wege <mvdwege@gmail.com>
Subject: Re: Simple Components: adding an existing object to a graph
Date: Sun, 26 Jan 2020 16:39:42 +0100
Date: 2020-01-26T16:39:42+01:00	[thread overview]
Message-ID: <87o8uqi5vl.fsf@gaheris.vdwege.eu> (raw)
In-Reply-To: r0k8s1$jve$1@dont-email.me

"Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org> writes:

> On 1/26/20 11:23 AM, Mart van de Wege wrote:
>> This one's for Dimitry, probably: I want to create a genealogy of
>> persons using his generic directed weighted graph package.
>
> Since a genealogy is a tree, wouldn't it make more sense to use
> Ada.Containers.Multiway_Trees?

I looked at that first, but how would you model the fact that a child
has 2 parents in a tree? As far as I can see Multiway_Trees is still
stuck in the model that every child node can have only one parent.

My idea was to link nodes, which can have multiple connections, using
the family relationship as a weight (using an enumeration type for the
relationships).

Regards,

Mart

-- 
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.


  reply	other threads:[~2020-01-26 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 10:23 Simple Components: adding an existing object to a graph Mart van de Wege
2020-01-26 13:10 ` Dmitry A. Kazakov
2020-01-26 13:24   ` Mart van de Wege
2020-01-26 14:48 ` Jeffrey R. Carter
2020-01-26 15:39   ` Mart van de Wege [this message]
2020-01-26 15:49   ` Mart van de Wege
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox