public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* gsl_quaternion proposition
@ 2006-05-10 14:28 picca
  2006-05-10 14:46 ` Robert G. Brown
  2006-05-15 19:54 ` Brian Gough
  0 siblings, 2 replies; 21+ messages in thread
From: picca @ 2006-05-10 14:28 UTC (permalink / raw)
  To: gsl-discuss

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Hello

I attached here a proposition for a gsl_quaternion base on the gsl_complex.
The tar file containe a quaternion directory.
Just extract it and apply the patch to the gsl CVS version:
The patch just add the quaternion directory to the makefile.am and modify configure.ac
the generation the Makefile from the quaternion directory.

after this regenerate the ./configure and ./configure;make

I ispired myself a lot from the gsl_complex as quaternion are a generalization of the complex. 
I hope it will not be to painfull to test.

for now I have just implemented
the basic add sub mul and somme other basic method.
please have a look at the gsl_quaternin_math.h

For each function of math.c I wrote a test in test.c

Have a good day.

Frederic

[-- Attachment #2: quaternion.tar.gz --]
[-- Type: application/octet-stream, Size: 10411 bytes --]

[-- Attachment #3: gsl_patch --]
[-- Type: application/octet-stream, Size: 5035 bytes --]

Index: Makefile.am
===================================================================
RCS file: /cvs/gsl/gsl/Makefile.am,v
retrieving revision 1.128
diff -u -r1.128 Makefile.am
--- Makefile.am	24 Dec 2004 13:55:10 -0000	1.128
+++ Makefile.am	10 May 2006 14:19:48 -0000
@@ -2,9 +2,9 @@
 
 # AUTOMAKE_OPTIONS = readme-alpha
 
-SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval roots multiroots min multimin monte ntuple diff deriv cdf wavelet doc
+SUBDIRS = gsl utils sys test err const complex quaternion cheb block vector matrix permutation combination sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval roots multiroots min multimin monte ntuple diff deriv cdf wavelet doc
 
-SUBLIBS = block/libgslblock.la blas/libgslblas.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la permutation/libgslpermutation.la combination/libgslcombination.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la
+SUBLIBS = block/libgslblock.la blas/libgslblas.la complex/libgslcomplex.la quaternion/libgslquaternion.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la permutation/libgslpermutation.la combination/libgslcombination.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la
 
 pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h
 
Index: configure.ac
===================================================================
RCS file: /cvs/gsl/gsl/configure.ac,v
retrieving revision 1.30
diff -u -r1.30 configure.ac
--- configure.ac	18 Apr 2006 17:04:56 -0000	1.30
+++ configure.ac	10 May 2006 14:19:49 -0000
@@ -363,5 +363,5 @@
 fi
 
 dnl
-AC_CONFIG_FILES([gsl-config gsl.pc gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile wavelet/Makefile Makefile])
+AC_CONFIG_FILES([gsl-config gsl.pc gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile sort/Makefile complex/Makefile quaternion/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile wavelet/Makefile Makefile])
 AC_OUTPUT

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-10 14:28 gsl_quaternion proposition picca
@ 2006-05-10 14:46 ` Robert G. Brown
  2006-05-10 17:03   ` Linas Vepstas
       [not found]   ` <20060510165528.9c69a5b6.picca@synchrotron-soleil.fr>
  2006-05-15 19:54 ` Brian Gough
  1 sibling, 2 replies; 21+ messages in thread
From: Robert G. Brown @ 2006-05-10 14:46 UTC (permalink / raw)
  To: picca; +Cc: gsl-discuss

On Wed, 10 May 2006, picca@synchrotron-soleil.fr wrote:

> Hello
>
> I attached here a proposition for a gsl_quaternion base on the gsl_complex.
> The tar file containe a quaternion directory.
> Just extract it and apply the patch to the gsl CVS version:
> The patch just add the quaternion directory to the makefile.am and modify configure.ac
> the generation the Makefile from the quaternion directory.
>
> after this regenerate the ./configure and ./configure;make
>
> I ispired myself a lot from the gsl_complex as quaternion are a generalization of the complex.
> I hope it will not be to painfull to test.
>
> for now I have just implemented
> the basic add sub mul and somme other basic method.
> please have a look at the gsl_quaternin_math.h
>
> For each function of math.c I wrote a test in test.c

Interesting idea.  Are you thinking of adding support for generalized
geometric (division) algebras (clifford algebras) of arbitrary grade or
just quaternions?

I'll try to take a look soon, although I'm going to be too busy for a
few days yet.

Thanks!

    rgb

(P.S. -- Happy decade-day to GSL and many thanks to the whole GSL
team:-)

>
> Have a good day.
>
> Frederic
>

-- 
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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-10 14:46 ` Robert G. Brown
@ 2006-05-10 17:03   ` Linas Vepstas
  2006-05-11 12:29     ` picca
       [not found]   ` <20060510165528.9c69a5b6.picca@synchrotron-soleil.fr>
  1 sibling, 1 reply; 21+ messages in thread
From: Linas Vepstas @ 2006-05-10 17:03 UTC (permalink / raw)
  To: Robert G. Brown; +Cc: picca, gsl-discuss

I demand that Robert G. Brown are belonging when Wed, May 10, 2006 at 10:47:01AM -0400:
> On Wed, 10 May 2006, picca@synchrotron-soleil.fr wrote:
> 
> >Hello
> >
> >I attached here a proposition for a gsl_quaternion base on the gsl_complex.

The code looks very professionally designed and well-pt-together.
However, it does nothing more than to define a type and some basic
operations on it (add, multiple, conjugate, etc).

What is the intent of this? Are you thinking of creating some 
gsl_sf_* routines to accept this type? What's the grand vision?

Surely the isomorphism of the quaternions to the algebra of rotations 
for 3D space SO(3)=SU(2)/Z2 is too shallow a justification for 
introducing a new type?

> Interesting idea.  Are you thinking of adding support for generalized
> geometric (division) algebras (clifford algebras) of arbitrary grade or
> just quaternions?

The other possible way to generalize is to su(n) and other Lie algebrs,
but I don't see the point.

--linas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
       [not found]         ` <Pine.LNX.4.64.0605101519360.4665@lilith.rgb.private.net>
@ 2006-05-11 11:58           ` picca
  2006-05-11 15:12             ` Robert G. Brown
  0 siblings, 1 reply; 21+ messages in thread
From: picca @ 2006-05-11 11:58 UTC (permalink / raw)
  To: gsl-discuss; +Cc: Robert G. Brown

On Wed, 10 May 2006 15:43:15 -0400 (EDT)
"Robert G. Brown" <rgb@phy.duke.edu> wrote:

> However, to remain consistent with "the gsl way" and its object/method type
> programming style you'd probably have to do
> 
> typedef struct
> {
>    double dat[4];
> } gsl_quaternion;
> 
> (for a quaternion where q.dat[0]-dat[3] maps into q = s + ix +jy +kz)
> and define suitable macros like GSL_QR(q), GSL_SET_QR(qp,s), GSL_QI(q),
> GSL_SET_QI(qp,x), ...
> 
> Then you'd have to define the whole raft of:
> 
>    gsl_quaternion_add(gsl_quaternion q1,gsl_quaternion q2);
> 
> and so on for all the non-commutative sums and products, including the scalar
> and outer product parts separately.

This what I have done for now.

>  So the arithmetic functions would
> basically have to be able to e.g. do \epsilon_{ijk} sums to create the cross
> products out of the ijk components, since quaternions are basically a mix of
> the Gibbs scalar product and Gibbs cross product in a single kind of number,
> for all that Hamilton thought them up first and better.

Can you explaine a little bit more please.


> This is fine, except that typing out the whole word "quaternion" inside each
> function call and definition is definitely a pain, and I never really liked
> using get/set macros when they take longer to type than a straightforward
> assignment.

yes "quaternion" is a pain to write but with completion in nowadays text editor this is not an issue.
An other point is that quaternion is explicite.

Frederic 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-10 17:03   ` Linas Vepstas
@ 2006-05-11 12:29     ` picca
  2006-05-11 21:42       ` Linas Vepstas
  0 siblings, 1 reply; 21+ messages in thread
From: picca @ 2006-05-11 12:29 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: rgb, gsl-discuss

On Wed, 10 May 2006 12:03:20 -0500
linas@austin.ibm.com (Linas Vepstas) wrote:

> The code looks very professionally designed and well-pt-together.
> However, it does nothing more than to define a type and some basic
> operations on it (add, multiple, conjugate, etc).
> 
> What is the intent of this? Are you thinking of creating some 
> gsl_sf_* routines to accept this type? What's the grand vision?

For me the intend is to use quaternions to compute rotations in the 3D
space. It is more accurate than matrix multiplication. I am writing a c+
+ library to do calculus for diffractometers. This is just about
rotation and diffraction. The purpose is to orientate a sample
(crystal) in the space relatively to a X-rays beam.

My problem is that a diffractometer can be describe by the
multiplication of quaternions. For example, a 6 circles diffractometer
is compose of 4 rotation for the sample:
1) q_mu
2) q_omega
3) q_kappa
4) q_phi

and 2 for the detector.
1) q_gamma
2) q_delta

q_sample = q_mu . q_omega . q_kappa . q_phi
q_detector = q_gamma . q_delta

to diffracte I must have

q_sample . v . q_sample* = q_detector . ki . q_detector - ki = Q

where v is a direction in the crystal and ki the vector of the X-ray, Q
is the scattering vector. I know v and ki and I want q_sample and
q_detector.

As you can see 1 have 6 unknowns with that diffractometer and only 3
equations (the coordinate of Q).
Their is multiple possibilities to orientate the crystal. I put some
constrain on the system to solve it. I need in fact to minimize the
system. That is why I want to use gsl.

for now I wrote a simplex algorithm to do that minimization but I would
like to switch to gsl to have more flexibility and more robust algo.

Now I have different kind of diffractometer so I need to generalize those calculus.
I red about quaternions in gsl mailing list so I decide to contribute (do My part for the GNU project) to gsl.

> Surely the isomorphism of the quaternions to the algebra of rotations 
> for 3D space SO(3)=SU(2)/Z2 is too shallow a justification for 
> introducing a new type?

we can say that because of this isomorphism, quaternions are
interesting for numerical computation ;).

> The other possible way to generalize is to su(n) and other Lie algebrs,
> but I don't see the point.

Maybe but I do not have the competences to do the generalization.
With your help why not ?

Have a nice day
Frederic

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-11 11:58           ` picca
@ 2006-05-11 15:12             ` Robert G. Brown
  2006-05-11 16:31               ` picca
  0 siblings, 1 reply; 21+ messages in thread
From: Robert G. Brown @ 2006-05-11 15:12 UTC (permalink / raw)
  To: picca; +Cc: gsl-discuss

On Thu, 11 May 2006, picca@synchrotron-soleil.fr wrote:

>> basically have to be able to e.g. do \epsilon_{ijk} sums to create the cross
>> products out of the ijk components, since quaternions are basically a mix of
>> the Gibbs scalar product and Gibbs cross product in a single kind of number,
>> for all that Hamilton thought them up first and better.
>
> Can you explaine a little bit more please.

Sorry, given a quaternion represented as (s,v) where s is a scalar part
and v is a three vector of numbers, each multiplied by i,j,k, when
multiplying two quaternions via e.g. the Grassman product you get e.g.

   (s3,v3) = s1 s2 - v1 \cdot v2 + s1 v2 + s2 v1 + v1 \times v2

Gibbs came along and took Hamilton's quaternions and Grassman's exterior
product and isolated from them the "dot product" and the "cross product"
as independent entities.  The cross product, of course, is:

    v3_k = \sum_{ij} v1_i v2_j \epsilon_{ijk}

where \epsilon_{ijk} is the completely antisymmetric unit tensor and
perfectly encapsulates Hamilton's rules, e.g. ij = k, ji = -k etc.
Since the cross product is associated with pretty much all axial
transformations -- rotation, the curl, etc -- people found it more
convenient to work with it directly as a part of Gibbs "vector analysis"
and gradually stopped using Hamilton's quaternionic formulation,
although folks like Clifford continued on the mathematical front and
generalized Grassman algebras so that they could manage other
dimensions/grades besides 1 (scalar), 2 (complex) and 4 (quaternion).

This may have been very unfortunate.  Vector analysis tends to treat the
vector components as "spatial" vectors, where algebra treats them as
numbers.  Geometric algebra (generalized Clifford algebras with a
geometric interpretation of the operations) splits the difference.
Thinking about things differently can lead to new insights -- few
physicists today are ever even taught that Maxwell originally worked
with a quaternionic formulation of electrodynamics and thought for a
while that there might have been deep meaning there, but eventually
conceded that its Gibbs formulation was easier to work with
computationally, whereby it took over the world.  IF "the unified field"
turns out to be an obvious extension of the geometric algebra
formulation of E&M to much higher grade -- a way of thinking of it that
is related to but not necessarily the same as looking for a covering
group and broken symmetry -- then this will turn out to have been a
truly horrible mistake.

But this is getting a bit OT, sorry.  This does answer Linas's question,
at least to some extent.  Although one certainly can do any actual
computations associated with quaternions by means of the various already
supported operations in the Grassman product (and by making up one's own
quaternion struct as needed) or via complex matrices or with 4x
matrices, all within the GSL, the process might be easier and more
portable if they were consistently supported within the library as named
entities.  Second, it is possible that 3-vector rotations are more
efficient when done by multiplying quaternions, although I'd want to see
it proven by actual code; other S3/SO(3R)/SU(2) operations can fairly
naturally be done in quaternionic form (and sometimes encapsulate
physics algebraically expressed in that form.  A third less obvious
reason is that having them in the GSL per se encourages students and
numerical workers to learn about them and use them, and this might
encourage them to learn in turn about geometric algebra in general which
might one day potentiate a breakthrough discovery in physics.

A lot of this is also true indeed if support for lie algebras and groups
were added to the GSL (although exactly how to add it -- once again it
is "there" insofar as one can select matrix representations already, so
this is largely a matter of specifying the data objects and methods e.g.
group members, the associated group product rules, the generators.  The
rotation group is obviously useful.  The Lorentz group is also, although
one starts to hit on the problem talked about a year or two ago about
the difficulty of specifying tensors higher than second rank in the GSL.
Getting up to the higher U(n) or SU(n) or SO() (etc) groups, though --
you hit an ever smaller list of possible numerical applications, do you
not?  So that once again having it is partly to encourage new work in it
and understanding of it.

The final issue being that in some sense it would be really lovely to
have matching support in the GSL AND in a symbolic/algebraic
manipulation language e.g. maxima (GPL) or mathematica or maple
(proprietary) for either GA objects or lie algebra/group objects or
both.  A lot of applying non-commutative products in physics involves
untangling products in exponentials via e.g.  Baker-Campbell-Hausdorff
type manipulations, which in the cases that haven't already been worked
out involves horrendous amounts of symbolic algebra.  I don't know that
these could be reduced to "just" arithmetic without working out the
algebra first... but here we're getting out at the edge of what I have
ever worked on and that bit is twenty-odd years old (and involved things
like FORMAC and macsyma, some of which no longer exist:-).  Maybe it
could be a joint maxima/GSL effort?

    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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-11 15:12             ` Robert G. Brown
@ 2006-05-11 16:31               ` picca
  2006-05-11 17:30                 ` Robert G. Brown
  0 siblings, 1 reply; 21+ messages in thread
From: picca @ 2006-05-11 16:31 UTC (permalink / raw)
  To: Robert G. Brown; +Cc: gsl-discuss

On Thu, 11 May 2006 11:13:34 -0400 (EDT)
"Robert G. Brown" <rgb@phy.duke.edu> wrote:

> But this is getting a bit OT, sorry.  This does answer Linas's question,
> at least to some extent.  Although one certainly can do any actual
> computations associated with quaternions by means of the various already
> supported operations in the Grassman product (and by making up one's own
> quaternion struct as needed) or via complex matrices or with 4x
> matrices, all within the GSL, the process might be easier and more
> portable if they were consistently supported within the library as named
> entities.

so creating a gsl_quaternion might be the begining of lie algebras in
the GSL ? after this we can add octonion etc...

>  Second, it is possible that 3-vector rotations are more
> efficient when done by multiplying quaternions, although I'd want to see
> it proven by actual code; other S3/SO(3R)/SU(2) operations can fairly
> naturally be done in quaternionic form (and sometimes encapsulate
> physics algebraically expressed in that form.

I think that composition of rotation are more accurate with quaternions
than with matrix product. I do not catch the S3/SO(3R)/SU(2) (you know
material science ;).

> A lot of this is also true indeed if support for lie algebras and groups
> were added to the GSL (although exactly how to add it -- once again it
> is "there" insofar as one can select matrix representations already, so
> this is largely a matter of specifying the data objects and methods e.g.
> group members, the associated group product rules, the generators.  The
> rotation group is obviously useful.  The Lorentz group is also, although
> one starts to hit on the problem talked about a year or two ago about
> the difficulty of specifying tensors higher than second rank in the GSL.
> Getting up to the higher U(n) or SU(n) or SO() (etc) groups, though --
> you hit an ever smaller list of possible numerical applications, do you
> not?  So that once again having it is partly to encourage new work in it
> and understanding of it.

If I understand we could add something more generic by defining a lie
object which different generator for complex numbers, quaternions and
octonion. Just by providing the multiplication table of the object ?

> Maybe it
> could be a joint maxima/GSL effort?

Yes it seems to be a long term program :), do you have some knowledge of maxima ?

Fred

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-11 16:31               ` picca
@ 2006-05-11 17:30                 ` Robert G. Brown
  2006-05-11 22:16                   ` Linas Vepstas
  0 siblings, 1 reply; 21+ messages in thread
From: Robert G. Brown @ 2006-05-11 17:30 UTC (permalink / raw)
  To: picca; +Cc: gsl-discuss

On Thu, 11 May 2006, picca@synchrotron-soleil.fr wrote:

> On Thu, 11 May 2006 11:13:34 -0400 (EDT)
> "Robert G. Brown" <rgb@phy.duke.edu> wrote:
>
>> But this is getting a bit OT, sorry.  This does answer Linas's question,
>> at least to some extent.  Although one certainly can do any actual
>> computations associated with quaternions by means of the various already
>> supported operations in the Grassman product (and by making up one's own
>> quaternion struct as needed) or via complex matrices or with 4x
>> matrices, all within the GSL, the process might be easier and more
>> portable if they were consistently supported within the library as named
>> entities.
>
> so creating a gsl_quaternion might be the begining of lie algebras in
> the GSL ? after this we can add octonion etc...

Actually, if this is the plan I'd STRONGLY recommend getting Geometric
Algebra for Physicists (by Doran and Lasenby:

  http://www.amazon.com/gp/product/0521480221/103-6500592-0253419?v=glance&n=283155

) and NOT doing octonion etc -- the problem is that
real->complex->quaternion->octonion is not the mathematically correct
progression or development of the graded division algebra, it is merely
historical and useful (up through quaternions, anyway).

Honestly, even before you try to fully implement quaternions it is
worthwhile to look into this, as it would save redoing/undoing work
later.  For example, there exists a geometric algebra with three
components in between complex (two) and quaternionic (four) although
Hamilton was unable to discover it.  It just >>doesn't have the same
interpretation<< as e.g. \vec{x} \cross \vec{y} (where \vec{x} is a 2d
vector) is NOT A VECTOR perpendicular to the xy plane, it is a kind of
number.  It is an ALGEBRA with a certain geometric interpretation, not a
system of vector transformations.

>>  Second, it is possible that 3-vector rotations are more
>> efficient when done by multiplying quaternions, although I'd want to see
>> it proven by actual code; other S3/SO(3R)/SU(2) operations can fairly
>> naturally be done in quaternionic form (and sometimes encapsulate
>> physics algebraically expressed in that form.
>
> I think that composition of rotation are more accurate with quaternions
> than with matrix product. I do not catch the S3/SO(3R)/SU(2) (you know
> material science ;).

Sorry, a listing of various unitary or orthogonal groups (lie groups).
You know most of these already by other names.  SU(2) is spinors (or,
really, quaternions) SO(3,R) (or O(3)) is the rotation group in three
dimensions, basically.  SU(2) double-covers SO(3,R) as people used to
demonstrate, sort of, with the belt trick that shows that rotations of
>>4<<\pi are symmetries of certain transformations, not 2\pi.  S3
(really should be S^3 to differentiate it from S_3, sorry) is the three
dimensional spherical surface of a unit four sphere, and can also be
made equivalent to quaternions of length 1 (S^1 is the circle group --
recall that every complex number can be represented by a modulus (the
radius of the circle) and a single angular coordinate that drives you
around the circle, so S^1 is identifiable with (unimodular) complex
numbers, S^0 with real numbers, etc -- basically to cover all
quaternions one has to scale S^3.  I get confused myself unless I
happen to be teaching one or another of these at which point I refresh
my memory.

There is a nice little Wiki article on "Lie Group" that explains a lot
of this.  And hey, I spared you mention of the exceptional groups,
metaplectic groups, and lots more -- mostly because I don't know much
about them.  However, presumably Linas's suggestion to follow this route
would include systematically adding support for arithmetical
representation of group objects and operations for these continuous
groups.

Doing generalized Lie Groups or algebras in the GSL would be a LOT
harder than doing Geometric Algebra, by the way.  GA is fairly
systematically grade-extensible, while there are many, many lie groups
with e.g.  double-cover relations, subgroup relations and embeddings,
and still unsolved problems (like what IS the "right" cover for U(1) x
SU(2) x SU(3) in the standard model:-) buried therein.  One would pretty
much have to cover every group, or at least every generic KIND of
dimension-extensible group -- by hand, one at a time.  You also have to
deal with representation theory, as group representations aren't unique
even for a single group.  The 3D quantum isotropic harmonic oscillator,
for example, lives in SU(3) but the generators aren't the same as those
used in QFT IIRC, for example.  To do arithmetic you'd likely have to
stick to matrix representations, but do you use a 4x4 matrix of reals or
a 2x2 matrix of complex's (a sum of pauli spin matrices plus the
identity matrix, which more or less ARE unit quaternions).

I actually think that this is a really interesting question to discuss
on-list, but it might help if we got some sense of how many GSL users
there are, at least on list, that are actually doing computations using
any of these ideas (where they've programmed their own spinor
representation, for example).  Anybody?  I personally do rotations a
fair bit and would love to do them more efficiently and/or accurately
and with minimal trig (!) as transcendental calls are muy caro
(expensive).

> If I understand we could add something more generic by defining a lie
> object which different generator for complex numbers, quaternions and
> octonion. Just by providing the multiplication table of the object ?

No, it is more complex.  If you go through the GA approach, you can
indeed add a more generic object.  In principle you could write a
constructor/destructor for a data object that represented a variable in
a geometric algebra of arbitrary grade, I think, and write composition
methods for those objects that did the right thing as a function of the
grade of the objects they acted on, although my copy of Doran and
Lasenby is in at the department and I'm home at the moment and I cannot
check to be certain.  This would include the grades missing from real
complex, quaternion, octonion, done, and would NOT necessarily be
understandable in terms of vectors -- in geometric algebra the cross
product of two vectors makes an area (dimensioned number) not
necessarily another vector (which is why it can work for 2d vectors).
It requires the generalization of what one means by the word "product"
beyond Gibbs.

I have no idea, as noted above, how to do "Lie Groups" (or algebras) in
anything like a completely general way.  There are a lot of them, and
they are very different -- so different that I think one would have to
do many of them by genera one at a time with as much effort as it would
take to do GA the first time, and with (I think) more ambiguities to be
resolved in the process, possibly to the frustration of at least some
users.

>
>> Maybe it
>> could be a joint maxima/GSL effort?
>
> Yes it seems to be a long term program :), do you have some knowledge
> of maxima ?

Only that it is derived from Macsyma, which I used pretty extensively --
20+ years ago.  To do enormously long and mindless computations of some
of these very things (algebraically) for my advisor, Larry Biedenharn,
who was a physics god of group theory among other things.  I also did
crystal band theory for my dissertation, which of course required me to
learn a lot about point groups.  So I know a bit more group theory than
the average physicist, although anybody working with supersymmetry or
even real QFT could probably laugh me out of any room.

My primary problem is just plain time and utility.  I took the time to
try to write a "tensor" extension of the GSL a couple of years ago and
it was never accepted.  Not unreasonably -- to add proper support for
tensor forms of arbitrary dimension would necessarily make the "matrix"
form a rank two tensor and the "vector" form a rank one tensor.  This in
turn would break a lot of things.  So to even try it one would have to
do a major revision number boost OR write a lot of cruftish and ugly
"glue" routines to convert rank two tensors to matrices, to pull vectors
out of higher rank tensors, where appropriate.  And I USE some of the
tensor/high dimension matrix code that I generated, so that made sense.

Now I have less time, and I don't use quaternions or GA in my actual
computations -- I just find them very, very interesting and suspect that
they are one of the missing keys to the TOE -- that the PARTICULAR Lie
Groups that are isomorphic to a geometric algebra of a high enough grade
are likely to be the ones of interest in TOE physics, which may one day
be enough of a hint for the string people to get the RIGHT theory out of
the very large space of alternatives.  So I can't see any easy way to
help right now.

I don't know if this isn't getting too OT for the list, though.  If
anybody is bored or getting PO'd, please sing out as I have no wish to
offend with these long replies.

    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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-11 12:29     ` picca
@ 2006-05-11 21:42       ` Linas Vepstas
  0 siblings, 0 replies; 21+ messages in thread
From: Linas Vepstas @ 2006-05-11 21:42 UTC (permalink / raw)
  To: picca; +Cc: rgb, gsl-discuss

I demand that picca@synchrotron-soleil.fr are belonging when Thu, May 11, 2006 at 02:27:29PM +0200:
> On Wed, 10 May 2006 12:03:20 -0500
> linas@austin.ibm.com (Linas Vepstas) wrote:
> 
> > What is the intent of this? Are you thinking of creating some 
> > gsl_sf_* routines to accept this type? What's the grand vision?
> 
> For me the intend is to use quaternions to compute rotations in the 3D
> space. 

OK.

> It is more accurate than matrix multiplication. 

!! I'm a little surprised by this statement. The round-off errors
from working with a 2x2 matrix directly, versus decomposing it 
via the 2x23 Paul matrices (quaternions) would seem to be nearly 
the same.

> > The other possible way to generalize is to su(n) and other Lie algebrs,
> > but I don't see the point.
> 
> Maybe but I do not have the competences to do the generalization.
> With your help why not ?

Many reasons not to do it:
-- presumably, there are already algebra packages that do this.
-- this is breaking new ground for GSL; there's no precedent.
-- I personally have no grand vision for what to do with this.
   I can imagine useful tools: maybe something that automatcally
   gave you the different representations. Something that 
   automatically allowed you to work in homogenous spaces 
   (aka the Wigner-Seitz cells for general Lie groups). Something
   that atomatically computed Anosov flows/horocycle flows. 
   Generalizations of hypergeometric functions. Generalizations of 3-j
   and 6-j symbols. I dunno. This is all obscure, narrow-interest 
   stuff.  I don't know what others would find useful.

--linas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-11 17:30                 ` Robert G. Brown
@ 2006-05-11 22:16                   ` Linas Vepstas
  2006-05-12  1:59                     ` Robert G. Brown
  0 siblings, 1 reply; 21+ messages in thread
From: Linas Vepstas @ 2006-05-11 22:16 UTC (permalink / raw)
  To: Robert G. Brown; +Cc: picca, gsl-discuss

I demand that Robert G. Brown are belonging when Thu, May 11, 2006 at 01:30:43PM -0400:
...
> doing Geometric Algebra, by the way.  

I thought geometric algrebra was just for 3D space and mosly aimed at 
college students; are you implying that there's a geometric algebra 
vocabulary for general Clifford algebras and/or supersymmetry? Does
it get used much in the broader context?

--linas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-11 22:16                   ` Linas Vepstas
@ 2006-05-12  1:59                     ` Robert G. Brown
  2006-05-12  7:40                       ` picca
  2006-05-12 18:48                       ` Linas Vepstas
  0 siblings, 2 replies; 21+ messages in thread
From: Robert G. Brown @ 2006-05-12  1:59 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: picca, gsl-discuss

On Thu, 11 May 2006, Linas Vepstas wrote:

> I demand that Robert G. Brown are belonging when Thu, May 11, 2006 at 01:30:43PM -0400:
> ...
>> doing Geometric Algebra, by the way.
>
> I thought geometric algrebra was just for 3D space and mosly aimed at
> college students; are you implying that there's a geometric algebra
> vocabulary for general Clifford algebras and/or supersymmetry? Does
> it get used much in the broader context?

Geometric algebra is the modern name for a (geometric interpretation of
a) Clifford algebra.  Perhaps it also fixes up a few things Clifford
didn't do quite right and makes it fully extensible.  There is a fairly
succinct Wikipedia article on it.  If you want to see more, Doran and
Lasenby is a FABULOUS book if you've ever studied Grassmann and Clifford
algebras etc.  When I was back in grad school, we "knew" that these
things were important and being done "wrong", but subsequently they've
been fixed up and are now being done right.  The importance (beyond the
obvious embedding of all sorts of basic equations and physical theories
in the algebra, e.g.  Maxwell's equations) remains to be demonstrated,
at least in reference to e.g. supersymmetry at least as far as I know
(which isn't too far:-).

That's why I am hesitant about seeing quaternions done out of context,
as it were.  If anybody ever does decide to do a real Clifford/Geometric
algebra package with the grade (dimension) of the algebra basically a
free input parameter, it would both include quaternions as a particular
grade and would probably represent them slightly differently.  Of course
the same could be said about complex.

    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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-12  1:59                     ` Robert G. Brown
@ 2006-05-12  7:40                       ` picca
  2006-05-12 13:07                         ` Robert G. Brown
  2006-05-12 13:58                         ` Jerome BENOIT
  2006-05-12 18:48                       ` Linas Vepstas
  1 sibling, 2 replies; 21+ messages in thread
From: picca @ 2006-05-12  7:40 UTC (permalink / raw)
  To: Robert G. Brown; +Cc: gsl-discuss

On Thu, 11 May 2006 22:00:10 -0400 (EDT)
"Robert G. Brown" <rgb@phy.duke.edu> wrote:

> On Thu, 11 May 2006, Linas Vepstas wrote:
> 
> > I demand that Robert G. Brown are belonging when Thu, May 11, 2006 at 01:30:43PM -0400:
> > ...
> >> doing Geometric Algebra, by the way.
> >
> > I thought geometric algrebra was just for 3D space and mosly aimed at
> > college students; are you implying that there's a geometric algebra
> > vocabulary for general Clifford algebras and/or supersymmetry? Does
> > it get used much in the broader context?
> 
> Geometric algebra is the modern name for a (geometric interpretation of
> a) Clifford algebra.  Perhaps it also fixes up a few things Clifford

Hello

look at http://www.perwass.de/cbup/programs.html
he wrote a clifford algebra library and it seems to be GPL. So no need
to add it to gsl The work have already be done.

Nevertheless as gsl_complex exist don't you think we can add a gsl_quaternion to have possibilities to do "basic" calculation with this mathematical object ?
Peoples like me are just using it for it's isomorphisme with O(3), and I do not think that I am the only one ;).

Frederic

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-12  7:40                       ` picca
@ 2006-05-12 13:07                         ` Robert G. Brown
  2006-05-12 13:38                           ` picca
  2006-05-12 13:58                         ` Jerome BENOIT
  1 sibling, 1 reply; 21+ messages in thread
From: Robert G. Brown @ 2006-05-12 13:07 UTC (permalink / raw)
  To: picca; +Cc: gsl-discuss

On Fri, 12 May 2006, picca@synchrotron-soleil.fr wrote:

> Hello
>
> look at http://www.perwass.de/cbup/programs.html
> he wrote a clifford algebra library and it seems to be GPL. So no need
> to add it to gsl The work have already be done.
>
> Nevertheless as gsl_complex exist don't you think we can add a gsl_quaternion to have possibilities to do "basic" calculation with this mathematical object ?
> Peoples like me are just using it for it's isomorphisme with O(3), and I do not think that I am the only one ;).

How very cool.  I'm downloading it now and will let you know after I've
played with it a bit.  As I said, the issue is the difficulty of adding
more general structures to the GSL when specific structs are already
there.  Because there is a matrix and a vector, adding a tensor is much
harder -- it provides two incompatible ways of doing the same thing and
doesn't seamlessly integrate into existing library calls.

Because there are real and complex (and maybe quaternion), will adding
clifford (which embraces all three) be much harder?

Then there are issues with the tightness and encruftedness of the
library itself.  As Linas says, there are probably not THAT many people
who use quaternions AS quaternions, and they can be coded one of several
ways according to their needs using GSL calls and/or ordinary code as it
is.  Yet (I think that) it is certainly desirable to have a common,
clean interface for them if only because it permits common debugging and
a certain element of code portability.  However, there IS a global issue
here -- how many people have to use some particular chunk of numerical
code before it is a candidate for inclusion in the library?  How
"important" does it have to be?

If the answer is "anything anybody wants badly enough to contribute" the
library maybe ends up bloated and inadequately maintained in patches as
folks introduce code and then abandon it to the core maintainers (who
may not understand it all that well).  So far this seems to be done via
a sort of consensual dictatorship, which is as it should be --
discussion on list, but the real maintainers have the last word (and if
you don't like it, become a real maintainer and help out:-).

This has to be balanced in the long run against the near-certainty that
some early design decisions were wrong or inadequately scalable, and the
almost-certain need to add major new components that will not cleanly
interface with existing ones the way things stand.  We've already seen a
little bit of this.  The solution in general is to have a development
version where things are permitted to really break as major new
components are added, whole chunks of structs are redefined (as
backwards compatibly as possible) and then do a major version bump on
the debugged release, signalling that this release may require that you
modify your older code.  That's the kind of thing that is probably
required to shoehorn in tensors AND make matrix/vector types a
consistent subset.  This is obviously very disruptive and can only
happen a very few times over the lifetime of a major library or people
will abandon it because of the maintenance demands it makes on them.

So it pays to proceed very slowly and deliberately, no?

   rgb

>
> Frederic
>

-- 
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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-12 13:07                         ` Robert G. Brown
@ 2006-05-12 13:38                           ` picca
  2006-05-12 14:14                             ` James Bergstra
  0 siblings, 1 reply; 21+ messages in thread
From: picca @ 2006-05-12 13:38 UTC (permalink / raw)
  To: Robert G. Brown; +Cc: gsl-discuss

> How very cool.  I'm downloading it now and will let you know after I've
> played with it a bit.  As I said, the issue is the difficulty of adding
> more general structures to the GSL when specific structs are already
> there.  Because there is a matrix and a vector, adding a tensor is much
> harder -- it provides two incompatible ways of doing the same thing and
> doesn't seamlessly integrate into existing library calls.
> 
> Because there are real and complex (and maybe quaternion), will adding
> clifford (which embraces all three) be much harder?

I do not know about this. Maybe looking at the sources of the club
librarie may help to understand how to design struct for clifford
algebra.

> Then there are issues with the tightness and encruftedness of the
> library itself.  As Linas says, there are probably not THAT many people
> who use quaternions AS quaternions, and they can be coded one of several
> ways according to their needs using GSL calls and/or ordinary code as it
> is.  Yet (I think that) it is certainly desirable to have a common,
> clean interface for them if only because it permits common debugging and
> a certain element of code portability.  However, there IS a global issue
> here -- how many people have to use some particular chunk of numerical
> code before it is a candidate for inclusion in the library?  How
> "important" does it have to be?

So we need some feed back of potential users. let's send a message to
gsl users and ask if peoples would be interested in a quaternion type ?
and what they plan to do with them if they were included in gsl.

More generaly can't we ask users to vote for things to add in gsl.
Create a list of priorities etc...

> If the answer is "anything anybody wants badly enough to contribute" the
> library maybe ends up bloated and inadequately maintained in patches as
> folks introduce code and then abandon it to the core maintainers (who
> may not understand it all that well).  So far this seems to be done via
> a sort of consensual dictatorship, which is as it should be --
> discussion on list, but the real maintainers have the last word (and if
> you don't like it, become a real maintainer and help out:-).

I agree with this that's why I propose to maintain the quaternion part
and sent my work to let you decide if the code is clean enought to be
included in gsl. It is very similar to the gsl_complex type so I must
not be so complicate to maintain. Or maibe I miss some points :).

> 
> This has to be balanced in the long run against the near-certainty that
> some early design decisions were wrong or inadequately scalable, and the
> almost-certain need to add major new components that will not cleanly
> interface with existing ones the way things stand.  We've already seen a
> little bit of this.  The solution in general is to have a development
> version where things are permitted to really break as major new
> components are added, whole chunks of structs are redefined (as
> backwards compatibly as possible) and then do a major version bump on
> the debugged release, signalling that this release may require that you
> modify your older code.  That's the kind of thing that is probably
> required to shoehorn in tensors AND make matrix/vector types a
> consistent subset.  This is obviously very disruptive and can only
> happen a very few times over the lifetime of a major library or people
> will abandon it because of the maintenance demands it makes on them.
> 
> So it pays to proceed very slowly and deliberately, no?

Yes so it is up to you to decide if quaternions have their room in gsl.

frederic.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-12  7:40                       ` picca
  2006-05-12 13:07                         ` Robert G. Brown
@ 2006-05-12 13:58                         ` Jerome BENOIT
  2006-05-12 18:36                           ` Linas Vepstas
  1 sibling, 1 reply; 21+ messages in thread
From: Jerome BENOIT @ 2006-05-12 13:58 UTC (permalink / raw)
  To: gsl-discuss

Hi,

picca@synchrotron-soleil.fr wrote:
> On Thu, 11 May 2006 22:00:10 -0400 (EDT)
> "Robert G. Brown" <rgb@phy.duke.edu> wrote:
> 
> 
>>On Thu, 11 May 2006, Linas Vepstas wrote:
>>
>>
>>>I demand that Robert G. Brown are belonging when Thu, May 11, 2006 at 01:30:43PM -0400:
>>>...
>>>
>>>>doing Geometric Algebra, by the way.
>>>
>>>I thought geometric algrebra was just for 3D space and mosly aimed at
>>>college students; are you implying that there's a geometric algebra
>>>vocabulary for general Clifford algebras and/or supersymmetry? Does
>>>it get used much in the broader context?
>>
>>Geometric algebra is the modern name for a (geometric interpretation of
>>a) Clifford algebra.  Perhaps it also fixes up a few things Clifford
> 
> 
> Hello
> 
> look at http://www.perwass.de/cbup/programs.html
> he wrote a clifford algebra library and it seems to be GPL. So no need
> to add it to gsl The work have already be done.

I am not agree:
it far better to deal with only one library
than a full collection of them written differently.

my 2 cents,
Jerome

> 
> Nevertheless as gsl_complex exist don't you think we can add a gsl_quaternion to have possibilities to do "basic" calculation with this mathematical object ?
> Peoples like me are just using it for it's isomorphisme with O(3), and I do not think that I am the only one ;).
> 


> Frederic
> 
> 

-- 
Jerome BENOIT
jgmbenoit_at_mailsnare_dot_net

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-12 13:38                           ` picca
@ 2006-05-12 14:14                             ` James Bergstra
  0 siblings, 0 replies; 21+ messages in thread
From: James Bergstra @ 2006-05-12 14:14 UTC (permalink / raw)
  To: picca; +Cc: gsl-discuss

> So we need some feed back of potential users. let's send a message to
> gsl users and ask if peoples would be interested in a quaternion type ?
> and what they plan to do with them if they were included in gsl.

Good idea, in fact you are doing it right now!  I vote against quaternions in
the gsl.  I think it would make an excellent package though, that's why packages
exist.

Check out 
http://www.gnu.org/software/gsl/#extensions

-James

-- 
James Bergstra
http://www-etud.iro.umontreal.ca/~bergstrj

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-12 13:58                         ` Jerome BENOIT
@ 2006-05-12 18:36                           ` Linas Vepstas
  0 siblings, 0 replies; 21+ messages in thread
From: Linas Vepstas @ 2006-05-12 18:36 UTC (permalink / raw)
  To: Jerome BENOIT; +Cc: gsl-discuss

I demand that Jerome BENOIT are belonging when Fri, May 12, 2006 at 02:20:07PM +0100:
> picca@synchrotron-soleil.fr wrote:
> >look at http://www.perwass.de/cbup/programs.html
> >he wrote a clifford algebra library and it seems to be GPL. So no need
> >to add it to gsl The work have already be done.
> 
> I am not agree:
> it far better to deal with only one library
> than a full collection of them written differently.

The only person(s) who should propose any sort of merger 
between gsl and the "CLU" clifford algebra library would
be the CLU author(s) themselves.

--linas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-12  1:59                     ` Robert G. Brown
  2006-05-12  7:40                       ` picca
@ 2006-05-12 18:48                       ` Linas Vepstas
  1 sibling, 0 replies; 21+ messages in thread
From: Linas Vepstas @ 2006-05-12 18:48 UTC (permalink / raw)
  To: Robert G. Brown; +Cc: picca, gsl-discuss

I demand that Robert G. Brown are belonging when Thu, May 11, 2006 at 10:00:10PM -0400:
> 
> That's why I am hesitant about seeing quaternions done out of context,
> as it were.  If anybody ever does decide to do a real Clifford/Geometric
> algebra package with the grade (dimension) of the algebra basically a
> free input parameter, it would both include quaternions as a particular
> grade and would probably represent them slightly differently.  Of course
> the same could be said about complex.

There is one other narrow area where quaternions and octonians
(together with real and complex) enjoy a "special" place in the 
grand scheme of things, and that is in the Berger classification
of Riemann symetric spaces (see wikipedia entries on "holonomy"
and "Calabi-Yau manifold"). Basically, if a space is symmetric,
its going to be a product of real or complex or quaternion 
or octonian thise SO(n) or SU(n) or Sp(n) or the special cases 
of G_2 or Spin(7)). But again, this is "obscure" and would not
be an argument for inclusion in GSL.

The point is only that quaternions are in a certain way "special"
and in a certain way a "natural" extension of the complex numbers 
in a way that general clifford algebras are not.

--linas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-10 14:28 gsl_quaternion proposition picca
  2006-05-10 14:46 ` Robert G. Brown
@ 2006-05-15 19:54 ` Brian Gough
  2006-05-16 13:07   ` picca
  1 sibling, 1 reply; 21+ messages in thread
From: Brian Gough @ 2006-05-15 19:54 UTC (permalink / raw)
  To: picca; +Cc: gsl-discuss

picca@synchrotron-soleil.fr writes:
 > I attached here a proposition for a gsl_quaternion base on the gsl_complex.
 > The tar file containe a quaternion directory.
 > Just extract it and apply the patch to the gsl CVS version:
 > The patch just add the quaternion directory to the makefile.am and modify configure.ac
 > the generation the Makefile from the quaternion directory.
 > 
 > after this regenerate the ./configure and ./configure;make
 > 
 > I ispired myself a lot from the gsl_complex as quaternion are a generalization of the complex. 
 > I hope it will not be to painfull to test.
 > 
 > for now I have just implemented
 > the basic add sub mul and somme other basic method.
 > please have a look at the gsl_quaternin_math.h
 > 
 > For each function of math.c I wrote a test in test.c

Hi,

Thanks for your email.  If you plan to distribute it, I'd ask for a
different prefix from "gsl_" to avoid confusion.  I put some notes
about making extensions at http://sourceware.org/gsl/design/gsl-design.html#SEC2 
If you want to follow those I can list it as an extension at
http://www.gnu.org/software/gsl/ if you like.

-- 
Brian Gough


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-15 19:54 ` Brian Gough
@ 2006-05-16 13:07   ` picca
  2006-05-19 18:46     ` Brian Gough
  0 siblings, 1 reply; 21+ messages in thread
From: picca @ 2006-05-16 13:07 UTC (permalink / raw)
  To: Brian Gough; +Cc: gsl-discuss

On Mon, 15 May 2006 19:37:24 +0100
"Brian Gough" <bjg@network-theory.co.uk> wrote:

> Thanks for your email.  If you plan to distribute it, I'd ask for a
> different prefix from "gsl_" to avoid confusion.  I put some notes
> about making extensions at http://sourceware.org/gsl/design/gsl-design.html#SEC2 
> If you want to follow those I can list it as an extension at
> http://www.gnu.org/software/gsl/ if you like.

Hello

I saw a contrib directory in the gsl library.
Can we put extensions packages in that directory ?
So peoples downloading gsl could have a direct access to all extensions ?
It could ease the process of building packages with thoses extension for the different distributions.
A sort of libgsl-extra package, identical for all distributions.

why not creating a special prefix for function in the packages like gsl_extra_... .
Extension could maturate in that directory and then if the quality is enought it could migrate inside gsl by just renaming all
gsl_extra_ into gsl_ and moving the directory to the gsl root?

Frederic

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: gsl_quaternion proposition
  2006-05-16 13:07   ` picca
@ 2006-05-19 18:46     ` Brian Gough
  0 siblings, 0 replies; 21+ messages in thread
From: Brian Gough @ 2006-05-19 18:46 UTC (permalink / raw)
  To: picca; +Cc: gsl-discuss

picca@synchrotron-soleil.fr writes:
 > I saw a contrib directory in the gsl library.  Can we put
 > extensions packages in that directory ?  So peoples downloading gsl
 > could have a direct access to all extensions ?  why not creating a
 > special prefix for function in the packages like gsl_extra_... .
 > Extension could maturate in that directory and then if the quality
 > is enought it could migrate inside gsl by just renaming all
 > gsl_extra_ into gsl_ and moving the directory to the gsl root?

It's easier for me to link to extensions from the GSL webpage, then
people can update them independently without me being involved.

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2006-05-19 18:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-10 14:28 gsl_quaternion proposition picca
2006-05-10 14:46 ` Robert G. Brown
2006-05-10 17:03   ` Linas Vepstas
2006-05-11 12:29     ` picca
2006-05-11 21:42       ` Linas Vepstas
     [not found]   ` <20060510165528.9c69a5b6.picca@synchrotron-soleil.fr>
     [not found]     ` <Pine.LNX.4.64.0605101106561.12011@lilith.rgb.private.net>
     [not found]       ` <20060510171946.28510201.picca@synchrotron-soleil.fr>
     [not found]         ` <Pine.LNX.4.64.0605101519360.4665@lilith.rgb.private.net>
2006-05-11 11:58           ` picca
2006-05-11 15:12             ` Robert G. Brown
2006-05-11 16:31               ` picca
2006-05-11 17:30                 ` Robert G. Brown
2006-05-11 22:16                   ` Linas Vepstas
2006-05-12  1:59                     ` Robert G. Brown
2006-05-12  7:40                       ` picca
2006-05-12 13:07                         ` Robert G. Brown
2006-05-12 13:38                           ` picca
2006-05-12 14:14                             ` James Bergstra
2006-05-12 13:58                         ` Jerome BENOIT
2006-05-12 18:36                           ` Linas Vepstas
2006-05-12 18:48                       ` Linas Vepstas
2006-05-15 19:54 ` Brian Gough
2006-05-16 13:07   ` picca
2006-05-19 18:46     ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).