Barton Willis | 1 Jul 2011 15:42
Favicon

multivariable kron_delta

I suggest extending kron_delta from a two argument to an n-argument function.
The change causes no errors with either the testsuite or the share testsuite. 

For one argument, kron_delta signals an error. Apparently, MMA defines 
kron_delta(x) = kron_delta(x,0). This, I think, will cause confusion.
Since kron_delta(x) signals an error, a user can assume 

 kron_delta(x0,...,xn) * kron_delta(y0,..., ym) = kron_delta(x0, ..., xn, y0, ..., ym)

is an identity without checking the number of arguments (if kron_delta(x) = kron_delta(x,0), 
it is *not* an identity).

The source code comment:

;; A n-ary Kronecker delta function: kron_delta(n0,n1, ..., nk) simplifies to 1 if
;; (meqp ni nj) is true for *all* pairs ni, nj in (n0,n1, ..., nk); it simplifies to 0 if
;; (mnqp ni nj) is true for *some* pair ni, nj in (n0,n1, ..., nk). Further kron_delta() --> 1
;; and kron_delta(xxx) --> wrong number of arguments error. Thus
;;
;;    kron_delta(x0,...,xn) * kron_delta(y0,..., ym) = kron_delta(x0, ..., xn, y0, ..., ym)
;;
;; is an identity.

Examples:

(%i4) kron_delta(1,1,1,1);
(%o4) 1

(%i5) kron_delta(1,1,%pi);
(%o5) 0
(Continue reading)

Barton Willis | 6 Jul 2011 19:34
Favicon

Re: multivariable kron_delta

The kron_delta function now takes two or more arguments--I committed new 
code, user documentation, and (regression) tests

Maxima 5.24post http://maxima.sourceforge.net
using Lisp Clozure Common Lisp Version 1.6-dev  (WindowsX8632)

(%i1) kron_delta(u,n,k);
(%o1)kron_delta(k, n, u)

(%i2) subst(k=n+1,%);
(%o2) 0

(%i3) kron_delta(a,b,-c) - kron_delta(-a,-b,c);
(%o3) 0

(%i4) kron_delta(a,a,a,a);
(%o4)  1

--Barton
Ether Jones | 8 Jul 2011 22:09
Picon

QR & SVD


Does Maxima have QR and/or SVD factorizations built in?  I couldn't find them.

If not, are there any plugins available?



--- On Wed, 7/6/11, Barton Willis <willisb <at> unk.edu> wrote:

From: Barton Willis <willisb <at> unk.edu>
Subject: Re: [Maxima] multivariable kron_delta
To: maxima <at> math.utexas.edu
Date: Wednesday, July 6, 2011, 1:34 PM

The kron_delta function now takes two or more arguments--I committed new
code, user documentation, and (regression) tests

Maxima 5.24post http://maxima.sourceforge.net
using Lisp Clozure Common Lisp Version 1.6-dev  (WindowsX8632)

(%i1) kron_delta(u,n,k);
(%o1)kron_delta(k, n, u)

(%i2) subst(k=n+1,%);
(%o2) 0

(%i3) kron_delta(a,b,-c) - kron_delta(-a,-b,c);
(%o3) 0

(%i4) kron_delta(a,a,a,a);
(%o4)  1


--Barton
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Raymond Toy | 8 Jul 2011 22:41
Picon

Re: QR & SVD

>>>>> "Ether" == Ether Jones <maxima <at> etherjones.us> writes:

    Ether>  Does Maxima have QR and/or SVD factorizations built in?  I
    Ether>  couldn't find them. If not, are there any plugins
    Ether>  available?

Maxima includes a significant portion of LAPACK, which includes QR and
SVD routines.  However, there are no interfaces from maxima to those
routines.  It will take a few days to create those interface routines.

Ray
Robert Dodier | 8 Jul 2011 23:36
Picon

Re: QR & SVD

On 7/8/11, Ether Jones <maxima <at> etherjones.us> wrote:
>
> Does Maxima have QR and/or SVD factorizations built in?  I couldn't find
> them.

Maxima functions dgeev and dgesvd punt to functions of the same name
in the lapack package. dgeev seems to apply the QR algorithm,
according to comments in the Fortran source code.

hth
Robert Dodier
Ether Jones | 11 Jul 2011 19:37
Picon

Re: QR & SVD


Thanks.

dgesvd is what I was looking for, for SVD.

But dgeev only works on a square matrix.

dgeqrf (from LAPACK) does a QR factorization on an MxN real matrix, but there's no interface to it in Maxima :-(


--- On Fri, 7/8/11, Robert Dodier <robert.dodier <at> gmail.com> wrote:

From: Robert Dodier <robert.dodier <at> gmail.com>
Subject: Re: [Maxima] QR & SVD
To: maxima <at> etherjones.us
Cc: maxima <at> math.utexas.edu
Date: Friday, July 8, 2011, 5:36 PM

On 7/8/11, Ether Jones <maxima <at> etherjones.us> wrote:
>
> Does Maxima have QR and/or SVD factorizations built in?  I couldn't find
> them.

Maxima functions dgeev and dgesvd punt to functions of the same name
in the lapack package. dgeev seems to apply the QR algorithm,
according to comments in the Fortran source code.

hth
Robert Dodier
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Raymond Toy | 11 Jul 2011 20:30
Picon

Re: QR & SVD

>>>>> "Ether" == Ether Jones <maxima <at> etherjones.us> writes:

    Ether>  Thanks.  dgesvd is what I was looking for, for SVD.  But
    Ether>  dgeev only works on a square matrix.  dgeqrf (from LAPACK)
    Ether>  does a QR factorization on an MxN real matrix, but there's
    Ether>  no interface to it in Maxima :-(

It shouldn't be too hard to create the interface, if you know a bit of
Lisp and just cargo-cult the existing interface to dgeev and/or
dgesvd.  I would do it, but can't right now.  Perhaps in a couple of
weeks?

Ray
Robert Dodier | 17 Jul 2011 17:31
Picon

Re: QR & SVD

For the record, I have a working interface for DGEQRF,
and it will be available as soon as I figure out how to commit it ....

best

Robert Dodier
Ether Jones | 11 Jul 2011 22:34
Picon

Re: QR & SVD


It shouldn't be too hard to create the interface, if you know a bit of
Lisp and just cargo-cult the existing interface to dgeev and/or
dgesvd.

My knowledge of LISP is zero.

I would do it, but can't right now.  Perhaps in a couple of
weeks?

That's a most generous offer, if you are so inclined. In the meantime, I've found another free interface to LAPACK which somewhat meets my needs for the time being, but the interface is awkward to use. If I had my choice, I'd much prefer Maxima.





--- On Mon, 7/11/11, Raymond Toy <toy.raymond <at> gmail.com> wrote:

From: Raymond Toy <toy.raymond <at> gmail.com>
Subject: Re: [Maxima] QR & SVD
To: maxima <at> math.utexas.edu
Date: Monday, July 11, 2011, 2:30 PM

>>>>> "Ether" == Ether Jones <maxima <at> etherjones.us> writes:

    Ether>  Thanks.  dgesvd is what I was looking for, for SVD.  But
    Ether>  dgeev only works on a square matrix.  dgeqrf (from LAPACK)
    Ether>  does a QR factorization on an MxN real matrix, but there's
    Ether>  no interface to it in Maxima :-(

It shouldn't be too hard to create the interface, if you know a bit of
Lisp and just cargo-cult the existing interface to dgeev and/or
dgesvd.  I would do it, but can't right now.  Perhaps in a couple of
weeks?

Ray

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima

Gmane