From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13ab88b30e0f779d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-27 04:25:39 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: gautier_niouzes@hotmail.com (Gautier) Newsgroups: comp.lang.ada Subject: Re: Efficient Matrix? Date: 27 Dec 2002 04:25:39 -0800 Organization: http://groups.google.com/ Message-ID: <17cd177c.0212270425.43d8ee1@posting.google.com> References: <3e0b2a66_4@news.bluewin.ch> NNTP-Posting-Host: 213.173.163.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1040991939 26080 127.0.0.1 (27 Dec 2002 12:25:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 27 Dec 2002 12:25:39 GMT Xref: archiver1.google.com comp.lang.ada:32330 Date: 2002-12-27T12:25:39+00:00 List-Id: 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!