comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com (Gautier)
Subject: Re: Efficient Matrix?
Date: 27 Dec 2002 04:25:39 -0800
Date: 2002-12-27T12:25:39+00:00	[thread overview]
Message-ID: <17cd177c.0212270425.43d8ee1@posting.google.com> (raw)
In-Reply-To: 3e0b2a66_4@news.bluewin.ch

Jonas Gasser:

> A : POINTER_MATRIX := new MATRIX(1..10000,1..5000);
> 
> I initialize a variable A from the type POINTER_MATRIX.
> Now I 'm interested to know if this is a common way of creating matrixes and
> if there is a faster and efficient way to handle this or if you have some
> ideas to optimize this.

Briefly, there is not _one_ answer to this (read also the other replies...),
but depending on your data density, computer RAM and CPU cache, the "best"
can be
- your MATRIX
- your MATRIX with pragma pack (smaller but machine code access to data
  possibly more complicated)
- a band matrix
- a sparse matrix
- ... ?

Code for both are in mathpaqs.zip below - just change
the Digits <> into Boolean.
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



      parent reply	other threads:[~2002-12-27 12:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3e0b2a66_4@news.bluewin.ch>
2002-12-26 22:09 ` Efficient Matrix? Adrian Knoth
2002-12-27  0:23   ` Alvery Grazebrook
2002-12-27  9:53     ` Adrian Knoth
2002-12-27 16:58       ` Robert A Duff
2002-12-28  1:44         ` Nick Roberts
2002-12-28 13:00         ` Adrian Knoth
2002-12-28 15:21           ` Bill Findlay
2002-12-28 15:48             ` Adrian Knoth
2002-12-28 23:26               ` Adrian Knoth
2002-12-28 16:07             ` Robert A Duff
2002-12-28 17:25               ` Bill Findlay
2002-12-28 17:35                 ` Bill Findlay
2002-12-28 20:51                 ` Robert A Duff
2002-12-28 15:58           ` Robert A Duff
2002-12-28 17:19             ` Adrian Knoth
2002-12-28 19:16               ` James S. Rogers
2002-12-28 20:45               ` Robert A Duff
2002-12-28 22:07                 ` Adrian Knoth
2002-12-28 23:42                   ` Robert A Duff
2002-12-27 12:25 ` Gautier [this message]
replies disabled

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