This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Two suggestions...


On Wed, 11 Jun 2003, Brian Gough wrote:

> Robert G. Brown writes:
>  >   a) In relation to the recent discussion on multidimensional arrays,
>  > what about adding gsl_tensor?  Something like:
>  > 
>  > typedef struct
>  > {
>  >   size_t dim;
>  >   size_t stride;
>  >   size_t *size;
>  >   size_t *lind;
>  >   void * data;
>  >   gsl_block * block;
>  >   int owner;
>  > } gsl_tensor;
> 
> I agree that this is the right way to define a tensor object in
> principle.
> 
> My concern about tensors is that it's difficult to do anything with
> the higher indices because all the blas/lapack routines only work for
> the last two indices.
> 
> So it doesn't seem possible to create tensor views, which is part of
> the usefulness of the vectors and matrices.

Well, but there are spatial lattices and relativistic computations and
e.g. spin degrees of freedom in various dimensionalities where higher
dimensional objects than 2 occur all the time, so a lot of physics
would benefit from tensors (although yes, we can roll our own:-).  In a
lot of these cases it isn't a matter of doing linear algebra per se that
is important (although in others it is -- so much so that it would be
lovely to be able to create a matrix or vector view of the tensor).

I'm in the process of experimenting with this.  Let me see what I can
do.  I'll try to keep my calls close enough to the gsl formats that
they'll be easy enough to port if it works out.

   rgb

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@phy.duke.edu




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]