|
From: | Fischlin Andreas |
Subject: | Re: Dynamic mutidimensional arrays |
Date: | Wed, 5 Apr 2023 06:25:09 +0000 |
Dear all, Benjamin, I prefer our approach (cf. LgMatrices) over what you sketched as being less limited (MaxElems being maximally large, with LMatrix = POINTER TO LMat and can allocate the maximum storage for any given compiler that is addressable via CARDINAL*). And more importantly, it avoids the messy address arithmetic – I really advise against – as the notation when accessing elements or vectors of a matrix is quite familiar: E.g. vec[i]-th element is denoted by vec^[i] or mat(i,j)-th element is denoted by mat^[i]^[j] ). This notation helps when it comes to implement more complex calculations, e.g. when computing eigen values etc. I would not want to implement that with the address arithmetic your approach would require. Andreas * I must admit that there are some aspects of LgMatrices specific coding I do not like. E.g. type of procedure arguments nRows or nCols should be of course at least CARDINAL and not INTEGER as given in procedures such as AllocMatrix or AllocVector. Even better would be to use TYPE Index = 1..MaxElems; ETH Zurich Prof. em. Dr. Andreas Fischlin IPCC Vice-Chair WGII Systems Ecology - Institute of Biogeochemistry and Pollutant Dynamics CHN E 24 Universitaetstrasse 16 8092 Zurich SWITZERLAND +41 44 633-6090 phone +41 44 633-1136 fax +41 79 595-4050 mobile Make it as simple as possible, but distrust it! ________________________________________________________________________
|
smime.p7s
Description: S/MIME cryptographic signature
[Prev in Thread] | Current Thread | [Next in Thread] |