From: Victor Porton <porton@narod.ru>
Subject: Re: Simple Components (Generic_Directed_Graph)
Date: Mon, 30 Oct 2017 16:58:53 +0200
Date: 2017-10-30T16:58:53+02:00 [thread overview]
Message-ID: <ot7enc$k9f$1@gioia.aioe.org> (raw)
In-Reply-To: ot722v$1sj0$1@gioia.aioe.org
Dmitry A. Kazakov wrote:
> On 2017-10-30 11:41, Victor Porton wrote:
>
>> I do not understand your logic in Generic_Directed_Graph:
>>
>> The procedures like
>>
>> procedure Disconnect (Parent : Node; Child : Node);
>>
>> do not take "Graph" argument.
>
> A graph consists of connected nodes. Each node is in and a graph.
>
>> Does it mean that there exists just one graph (per instantiation)?
>
> No. If two nodes are mutually unreachable you have two graphs.
>
>> This looks wrong for me. First it is using global variables.
>
> It uses referential semantics. Node is an access type to the type you
> pass to the package when you instantiate it. E.g. if you want a graph of
> Strings you instantiate the package with String. Then Node is a pointer
> to string.
>
> The notion of scope does not really applied to the structures like
> graph. You can scope the pool you pass to the instance. You can scope
> nodes with some logic attached when a node leaves its scope. But
> otherwise it makes little sense to talk about the scope of a graph.
What's about having multiple graphs for the situation if when A and B are of
type T then A=B implies A'Access=B'Access?
It seems in this situation we cannot have multiple graphs of nodes of type
T.
It yet seems bad for me, but may I mistake.
Maybe it's worth to create an alternative graph type (with every graph being
a full-fledged object)? However I do not quite understand your logic, maybe
you are right after all and this is not necessary.
--
Victor Porton - http://portonvictor.org
next prev parent reply other threads:[~2017-10-30 14:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 10:41 Simple Components (Generic_Directed_Graph) Victor Porton
2017-10-30 11:04 ` Victor Porton
2017-10-30 11:34 ` Dmitry A. Kazakov
2017-10-30 11:23 ` Dmitry A. Kazakov
2017-10-30 14:58 ` Victor Porton [this message]
2017-10-30 15:46 ` Dmitry A. Kazakov
2017-10-30 17:46 ` Dennis Lee Bieber
2017-10-30 20:29 ` Dmitry A. Kazakov
2017-10-30 15:13 ` Victor Porton
2017-10-30 15:54 ` Dmitry A. Kazakov
2017-10-30 18:30 ` Victor Porton
2017-10-30 20:43 ` Dmitry A. Kazakov
2017-10-30 21:20 ` Victor Porton
2017-10-30 22:39 ` Dmitry A. Kazakov
2017-10-31 7:36 ` Simon Wright
2017-10-31 8:16 ` Dmitry A. Kazakov
2017-10-31 11:12 ` Victor Porton
2017-10-31 12:42 ` Dmitry A. Kazakov
2017-10-31 15:07 ` Victor Porton
2017-10-31 15:48 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox