On Monday 08 September 2008, Paul Leopardi wrote:
> Hi all,
> I will be attending Sage Days 10 in Nancy, but am very new to Sage and
> need some pointers on where to find stuff. Also, I have heard about
> some recent developments in C++ linear algebra libraries and wonder
> how this relates to Sage.
>
> The most recent development is Matrix Template Library (MTL) 4.
> http://www.osl.iu.edu/research/mtl/mtl4/
> This enables the use to write linear algebra expressions in C++ in a
> more "natural" notation.
>
> There is also Glas. http://glas.sourceforge.net/doc/index.html
> http://sourceforge.net/projects/glas
> This is intended to provide a generic C++ interface to linear algebra
> complete with concepts.
> http://glas.sourceforge.net/doc/index.html
Hi there, I never heard about these libraries (which probably doesn't mean
much), which base fields do they support? How would they compare to LinBox
and all the other libraries we have in Sage now?
http://www.sagemath.org/links-components.html
> Also, over a period of time I have developed a Clifford algebra
> library, GluCat http://glucat.sourceforge.net
> http://sourceforge.net/projects/glucat GluCat implements Clifford algebras
> over the real field.
>
> OK, so questions.
> 0. Does Sage define concepts in the same way as MTL and Glas?
Well, there are generic matrix classes for both dense and sparse + specialised
implementation for some (common) base fields. E.g. dense matrices over the
integers, over finite fields, sparse matrices over finite fields.
> 1. How does Sage do linear algebra over the real and complex fields?
> Does Sage provide matrix functions such as matrix square root and
> logarithm, in the same way as, eg. Matlab? Is this done via Scipy or
> Octave, or at a lower level?
Octave is not a standard part of Sage. AFAIK there are several options for
matrices over RR and RR:
sage: A = random_matrix(RDF,20,20)
sage: type(A)
sage: A = random_matrix(CDF,20,20)
sage: type(A)
It seems these implementations use GSL and numpy. One can use numpy/scipy data
types directly too.
> 2. How do I go about combining exact and inexact linear algebra? Does
> Sage provide a common interface to both? In C++? In Python?
In Python/Cython. Just create your matrices and start playing with it.
sage: A = random_matrix(RDF,20,20)
sage: A = random_matrix(GF(2),20,20)
sage: A = random_matrix(GF(127),20,20,sparse=True)
> At the core of the matrix_multi<> class in GluCat is the generation
> and manipulation of basis matrices. These are -1,0,1 matrices which
> generate finite groups. Right now these are implemented as compressed
> uBLAS matrices over the type Scalar_T (typically float or double), but
> I see no reason why they can be re-implemented as matrices over the
> integers, or even over the field Z/3Z, as long as multiplication of a
> basis matrix by a Scalar_T is suitably defined in the context of the
> Clifford algebra.
>
> 3. How would I go about extending GluCat to cover Clifford algebras
> over finite fields, fields of non-zero characteristic, especially
> characteristic 2? Some of the answer to this depends on the existing
> design of GluCat, some on the nature of Clifford algebras, but maybe
> the exact linear algebra used in Sage may help here.
I suppose you'd interface to the C/C++ libraries directly which are used by
Sage to implement exact linear algebra. These are LinBox, IML, NTL and M4RI.
> 4. How would I go about incorporating GluCat into Sage? Would it be
> better to leave GluCat as standalone library and provide some sort of
> interfacing? Would this be along the lines of SWIG? Would it be better
> to interface GluCat to GAP or does GAP only deal with discrete
> algebras?
I can't answer that, but having an external library + interface is certainly
the way to go. SWIG is definitely not an option, have a look at Cython.
http://www.cython.org
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---