is there a vector cross product function?
Jordi Burguet Castell
jordi.burguet-castell@cern.ch
Tue Mar 9 19:23:00 GMT 2004
> > Maybe its time for a gsl_tensor framework?
>
> There is a tensor directory on the tensor-1-3 branch in the gsl cvs
> repository on savannah.gnu.org, written by Jordi Burguet Castell.
Hello there.
> It is a tricky problem though, in my opinion.
>
> The approach there uses the correct type of struct, but I feel it
> needs to use arrays instead of varargs for passing the n-dimensional
> arguments in and out.
It is very nice to read that it is the correct type of struct, esp. coming
from you, thanks! The arrays-vs-varargs is one of the points where I feel
more uneasy. I used varargs initially to get a cleaner syntax in user space,
but maybe the trade is not worth it.
> The remaining unsolved issue is coming up with nice handling of views
> and mappings to matrices and vectors. Without this the tensors can't
> interact with the rest of the linear algebra routines, which reduces
> their usefulness significantly in practice. A major design decision
> is whether or not the tensor should allow physical sizes different
> from the tensor size itself (i.e. LDA vs N in BLAS/LAPACK
> terminology). This has always been unclear to me.
I completely agree. My version doesn't handle views nor mappings at all, in
part to simplify the code, and in part because I haven't figured out a way to
do it. Tensor size is always equal to physical size, and the operations
aren't optimized at all in the way that BLAS/LAPACK's are. The only strong
point about them is that they work, and in a pretty general way.
Since last June or so, when I sent you my first draft, I have improved the GSL
version of my C++-mini-tensor-library. I haven't commit-ed it to Savannah,
though, as I wasn't sure of how to manage a branch and was afraid of screwing
something up. Maybe I should commit anyway?
So, if you pardon my extra KB, I'm attaching the last version of the tensor
directory I was working on for GSL (to "tar xzf" in the GSL/ directory, and
change trivially the GSL/ Makefile.am and configure.ac), improved but not yet
complete. Also, as reference, there is *again* the C++ version completely
functional.
Before xmas I said I hoped to finish it before 2004. I didn't, but still
hoping to finish it soon... As usual, anybody willing to shortcircuit me and
do it... blah blah.
Jordi
PS: In the spirit of the recently posted
http://math-atlas.sourceforge.net/faq.html#utone , I must say that I use GSL
quite a lot in my PhD work, and so do a lot of people in our experiment at
Cern (Harp), and it is simply wonderful. Thanks a lot.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tensor-cpp.tar.gz
Type: application/x-tgz
Size: 12149 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20040309/2b985629/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tensor.tar.gz
Type: application/x-tgz
Size: 10273 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20040309/2b985629/attachment-0001.bin>
More information about the Gsl-discuss
mailing list