comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Standard Set types don't support a feature
Date: Sun, 29 Oct 2017 19:27:50 +0100
Date: 2017-10-29T19:27:50+01:00	[thread overview]
Message-ID: <ot56j4$15et$1@gioia.aioe.org> (raw)
In-Reply-To: ot53hk$10bc$1@gioia.aioe.org

On 2017-10-29 18:35, Victor Porton wrote:

> If I first calculate transitive closure and store it in a matrix (or as I
> consider, a sparse matrix represented as a set of pairs), then checking
> existence of path between two given elements becomes much faster.

Yes, an ordered set of node pairs with a hash or else binary search to 
look for a pair.

> Well, maybe all it is a preliminary optimization. Maybe regular (non-sparse)
> incidence matrix will be not slower.

Rather faster, considering 2D Boolean array.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2017-10-29 18:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29 16:15 Standard Set types don't support a feature Victor Porton
2017-10-29 17:10 ` Dmitry A. Kazakov
2017-10-29 17:35   ` Victor Porton
2017-10-29 18:27     ` Dmitry A. Kazakov [this message]
2017-11-12  1:50       ` Robert Eachus
2017-11-17  0:28     ` Randy Brukardt
2017-10-29 17:28 ` Victor Porton
2017-10-29 17:35 ` Simon Wright
replies disabled

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