This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
N dim arrays
- From: Edwin Robert Tisdale <E dot Robert dot Tisdale at jpl dot nasa dot gov>
- To: gsl-discuss at sources dot redhat dot com
- Date: Fri, 01 Feb 2002 08:47:13 -0500
- Subject: N dim arrays
- Organization: Jet Propulsion Laboratory
- Reply-to: E dot Robert dot Tisdale at jpl dot nasa dot gov
Szymon Jaroszewicz wrote:
> Has anybody done/is doing any work on generalizing matrices
> to more than two dimensions (with slicing etc.)?
> I might do it but don't want to duplicate anybody's effort.
Take a look at
the Vector, Signal and Image Processing Library (VSIPL)
http://www.vsipl.org/
and The C++ Scalar, Vector, Matrix and Tensor class library
http://www.netwood.net/~edwin/svmtl/
Multi-dimensional arrays of numbers are called tensors.
The first three orders have special names
order name
-------------------------
0 scalar
1 vector
2 matrix
3 third order tensor
4 fourth order tensor
. .
. .
. .
The rank of a tensor is a synonym for
the order of a tensor and should not
be confused with the rank of a matrix.
We don't see third and higher order tensors
very much in numerical computing
so there is no consensus about
what functionality should be provided
in a numerical class library like the GSL.
Fortran programmers prefer range notation
first, final, stride
but C programmers prefer slice notation
first, extent, stride
for access to subtensors.