Rank (computer programming): Difference between revisions

Content deleted Content added
m Updated wikilink
expand slightly, copyedit
Line 1:
In [[computer programming]], the '''rank of an array''' is usually defined to be the number of [[dimension]]s of that array. For example, a [[matrix (mathematics)|matrix]] is an array of rank 2. In some languages, such as [[APL programming language|APL]], a [[scalar]] is defined as an array of rank 0.
In [[Fortran]], the number of dimensions in an [[array]].
 
In APL, the unary ''ρ'' ([[rho (letter)|rho]]) operator can be used to find the dimensions of an array; thus, ''ρρA'' is the rank of ''A''.
For example, a [[matrix (mathematics)|matrix]] is an array of rank 2.
 
==See also==
*[[Rank (linear algebra)]], for a different definition of "rank" as applied to [[matrix (mathematics)|matrices]]
 
A [[scalar]] is sometimes defined as an array of rank 0.
 
{{compu-lang-stub}}
 
[[Category:Data types]]