This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: is there a vector cross product function?
On Fri, Mar 05, 2004 at 03:32:00PM +0000, Brian Gough wrote:
> Britton Kerin writes:
> >
> > I was looking around for a cross product function and didn't see it. Does
> > it go by some other name, or is there a reason this sort of routine is not
> > included?
>
> It is not included, because 3-vectors do not fit naturally into the
> gsl_vector framework.
I suppose I should ignore this email, but can't help myself.
You can compute the cross-product for n-dimensional vectors, its
called the alternating product. Brian knows this, Britton may not.
Maybe its time for a gsl_tensor framework?
FYI,
I posted some code a few months ago that computed the alternating
product. Two problems with that code: 1) it didn't use the gsl framework,
2) I was using it to compute the determinant of a matrix, which
is an algorithm that goes as O(N!) that right n-factorial in cpu time
so its ahh, tempting to say "if you need the determinant of something,
you shouldn't use a computer to compute it."