matrix

Laurent MICHEL laurent.michel at astro.unistra.fr
Wed Apr 15 10:34:19 CEST 2020


David,

I made a confusion between the mathematical object (matrix) and data arrays.

Sorry

LM

Le 03/04/2020 à 17:31, David Berry a écrit :
> Is there such a thing as a 3D matrix? I thought they were by
> definition 2D? For instance, how would you multiply a pair of 3D
> matrices together?
> 
> David
> 
> On Fri, 3 Apr 2020 at 16:12, Laurent MICHEL
> <laurent.michel at astro.unistra.fr> wrote:
>>
>>
>>
>> Le 03/04/2020 à 16:58, CresitelloDittmar, Mark a écrit :
>>> Ah, I see..
>>>     You're suggesting we need to support MxNxP matrices (or more).
>> No, this was just an example to illustrate what I was saying.
>>>     I think an earlier version of the model had an abstract Matrix, with
>>> Matrix2D.. we could go back to that, allowing for Matrix3D, etc extensions.
>>>     Or forgo the abstract head and just rename it.
>> In the model, Matrix clearly refers to a 2D matrix.
>> Regarding the model scope, there is no need for matrices of whatever
>> dimension, therefore there is non need for any high level of abstraction.
>> I suggest Matrix2D(nb_cols, nb_rows)
>>
>> Laurent
>>>
>>>
>>>
>>> On Fri, Apr 3, 2020 at 9:20 AM Laurent MICHEL
>>> <laurent.michel at astro.unistra.fr
>>> <mailto:laurent.michel at astro.unistra.fr>> wrote:
>>>
>>>      Mark,
>>>
>>>      To me, a (N,M) matrix is a 2D matrix with N rows and M columns (e.g. a
>>>      pixel array).
>>>      You want to model a ND matrix, you have to set N (matrix dimension) as
>>>      an attribute plus an array of N values giving the size along of each
>>>      individual axis.
>>>      If you want to specifically model a 2D matrix, it would be better
>>>      have 2
>>>      attributes with a non confusing names (e.g. columns, rows)
>>>
>>>      Laurent
>>>
>>>      Le 02/04/2020 à 16:47, CresitelloDittmar, Mark a écrit :
>>>       > Not sure I follow.  Wouldn't a Matrix2D be a Matrix with M=2, N=2?
>>>       > We could discuss the names, but these seemed pretty standard and are
>>>       > described as M rows, N columns.  I know I always have to go back and
>>>       > review which way is rows and which is columns, but I don't deal with
>>>       > matrices very often.
>>>       >
>>>       >
>>>       >
>>>       > On Thu, Apr 2, 2020 at 8:50 AM Laurent MICHEL
>>>       > <laurent.michel at astro.unistra.fr
>>>      <mailto:laurent.michel at astro.unistra.fr>
>>>       > <mailto:laurent.michel at astro.unistra.fr
>>>      <mailto:laurent.michel at astro.unistra.fr>>> wrote:
>>>       >
>>>       >     Dear,
>>>       >
>>>       >     Comment #3:
>>>       >
>>>       >     - The matrix operation class (Matrix) seems to refer to a 2D
>>>      matrix.
>>>       >     The
>>>       >     class could be renamed Matrix2D to keep room for future high
>>>       >     dimensionality classes
>>>       >
>>>       >     - The matrix dimensions are named N and M. Personally, I'm
>>>      pretty sure
>>>       >     to always confuse N.M and M.N. It could be safer to renamed these
>>>       >     attributes with something more expressive like (row, columns)
>>>       >
>>>       >     LM
>>>       >     --
>>>       >     --
>>>       >     ---- Laurent MICHEL              Tel  (33 0) 3 68 85 24 37
>>>       >            Observatoire de Strasbourg  Fax  (33 0) 3 68 85 24 32
>>>       >            11 Rue de l'Universite      Mail
>>>       > laurent.michel at astro.unistra.fr
>>>      <mailto:laurent.michel at astro.unistra.fr>
>>>      <mailto:laurent.michel at astro.unistra.fr
>>>      <mailto:laurent.michel at astro.unistra.fr>>
>>>       >            67000 Strasbourg (France)   Web
>>>      http://astro.u-strasbg.fr/~michel
>>>       >     ---
>>>       >
>>>
>>>      --
>>>      ---- Laurent MICHEL              Tel  (33 0) 3 68 85 24 37
>>>             Observatoire de Strasbourg  Fax  (33 0) 3 68 85 24 32
>>>             11 Rue de l'Universite      Mail
>>>      laurent.michel at astro.unistra.fr <mailto:laurent.michel at astro.unistra.fr>
>>>             67000 Strasbourg (France)   Web http://astro.u-strasbg.fr/~michel
>>>      ---
>>>
>>
>> --
>> ---- Laurent MICHEL              Tel  (33 0) 3 68 85 24 37
>>        Observatoire de Strasbourg  Fax  (33 0) 3 68 85 24 32
>>        11 Rue de l'Universite      Mail laurent.michel at astro.unistra.fr
>>        67000 Strasbourg (France)   Web  http://astro.u-strasbg.fr/~michel
>> ---

-- 
---- Laurent MICHEL              Tel  (33 0) 3 68 85 24 37
      Observatoire de Strasbourg  Fax  (33 0) 3 68 85 24 32
      11 Rue de l'Universite      Mail laurent.michel at astro.unistra.fr
      67000 Strasbourg (France)   Web  http://astro.u-strasbg.fr/~michel
---


More information about the dm mailing list