0
$\begingroup$

If I have an array a of arrays, in many languages they may have different size. Is there a word for an array of arrays where all the arrays have the same length?

Edit: An array of arrays may have the following form:

[ 
 [ 1, 2, 3 ]
 [ 1, 2, 3, 4 ]
 [ 1, 2 ]
]

But in order to convert this to a matrix you would have to assume some default value or trim the arrays. The following array of arrays is possible to convert into a matrix without any asumptions or trimming as all arrays have same length.

[ 
 [ 1, 2, 3, 4 ]
 [ 1, 2, 3, 4 ]
 [ 1, 2, 3, 4 ]
]

Is there some name or classifier for a matrix of this kind?

asked Aug 12, 2015 at 8:50
$\endgroup$
6
  • $\begingroup$ please clearly define your problem. $\endgroup$ Commented Aug 12, 2015 at 10:21
  • 5
    $\begingroup$ a matrix, a table? $\endgroup$ Commented Aug 12, 2015 at 10:34
  • $\begingroup$ I'm simply wondering if there is a classifier or name for an array of arrays where all the contained arrays are of same length. In for instance C# one may have an array of arrays, and each of the contained arrays may have a different size. An array like that would be possible to convert into a matrix without assuming some default value, but would still be different from a matrix. $\endgroup$ Commented Aug 12, 2015 at 11:24
  • 1
    $\begingroup$ An array of arrays is just, surprise, "an array of arrays". You may also call it a multidimensional array. We cannot make up names for everything, and when a simple expression will do, why bother. How do you call a man who is tall, with curly hair and blue pants? There are probably millions, but no special name. Actually, we create names for new structure with specific properties. It is not really needed in your case. ... Unlike you enjoy reading names of molecules, which can fill a whole line (but there is a reason in that case). $\endgroup$ Commented Aug 12, 2015 at 12:48
  • $\begingroup$ @babou but s/he doesn't need simple "an array of arrays" but "an array of arrays called when all arrays have the same size" $\endgroup$ Commented Sep 5, 2015 at 22:26

4 Answers 4

5
$\begingroup$

In C# world there are 2 kinds of array declarations, and 2 names for it:

  1. Jagged:
[ 
 [ 1, 2, 3 ]
 [ 1, 2, 3, 4 ]
 [ 1, 2 ]
]
  1. Rectangular:
[ 
 [ 1, 2, 3, 4 ]
 [ 1, 2, 3, 4 ]
 [ 1, 2, 4, 4 ]
]
answered Aug 12, 2015 at 17:30
$\endgroup$
1
$\begingroup$

An array of arrays, also known as a multi dimensional array :-)

A Matrix is only one of the structures that can be represented by such an array, when all first level elements are of the same size.

answered Aug 12, 2015 at 12:57
$\endgroup$
1
$\begingroup$

I believe "rectangular array" is the most common term and one people aren't likely to misunderstand.

answered Aug 12, 2015 at 18:18
$\endgroup$
1
  • $\begingroup$ It might be three-dimensional, or even more... and that's not a "rectangle" anymore. $\endgroup$ Commented Aug 12, 2015 at 20:13
0
$\begingroup$

I don't think there is a term for this (a "multidimensional array" may or may not be the same thing) but I'm familiar with a term for the opposite: a "ragged array".

answered Aug 12, 2015 at 13:23
$\endgroup$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.