 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Re: Bug in Eigenvectors?
| [MUG] Re: Bug in Eigenvectors? |
|
Author: David Linder
Posted: Sat, 15 Feb 2003 01:12:05 -0500
|
>> From: David Linder "dlinder"
It wasn't clear to me whether the original poster's
problems came from an example which used linalg or the
newer LinearAlgebra package. But perhaps I can add a few
comments of interest.
Suppose first that the data is used in Maple's lower-
case matrix object(s), ie, for use with linalg. If the
problem involved floating-point data then the routines
which end up getting called to do the work are called from
`evalf/Eigenvals`. It will make a difference according to
whether the problem is a standard eigen-problem such as
solving A*x=lambda*x or a generalized problem like
A*x=lambda*B*x . From the responses of those who were sent
the actual data I gather that the data is complex. So if,
say, the problem were to compute the complex generalized
eigenvectors then Maple's `evalf/EigensCG` would be called.
I believe that this is a translation to Maple of the routines
associated with CQZHES (ACM TOMS Algorithm 535, available from
www.netlib.org) which incorporate a QZ algorithm.
If on the other hand one were to supply the same data
in upper-case Matrix objects to Maple's newer LinearAlgebra
package then a QZ implementation based on newer LAPACK sources
would be used. In Maple 7 this would take the route:
Nag's F02EBF driver -> Nag's Chapter F08 "worker" routines.
>>From the online documentation at www.nag.co.uk one can see
that the Nag Fortran Library's F08 routines are based upon
parts of LAPACK. In Maple 8 the route would be CLAPACK's
DGEEVX driver -> worker routines. One reason for this change
is that F02GJF accepts the complex data only split into
separate real and imaginary components, whereas the DGEEVX
driver can be passed the complex data directly, avoiding
the step of splitting the components. Of course, Nag's
Fortran Library also has equivalents for the newer LAPACK
drivers.
In Maple one can issue,
> infolevel[LinearAlgebra] := 1;
after which userinfo messages should be shown which indicate
which driver routines are being accessed via Maple's
external calling mechanism from within LinearAlgebra.
I hope that this illustrates that Maple is using modern
and fast compiled code to do such problems. One response
to the original query indicated that Matlab used Linpack
and Eispack routines. This is no longer the case, I believe.
I think that some digging will reveal that the latest
versions of Maple and Matlab are both using the more modern
(block-based) LAPACK routines for solving eigenvalue problems.
Someone also mentioned the precision for computation. The
default for Maple will be to use the double-precision
CLAPACK (or Nag) here, which I hope would compare well with
Matlab results. If the data is supplied in Matrices with
floating-point datatypes (eg, float[8], complex(sfloat), etc)
then time spent on additional copying can be avoided.
Dr Wright's suggestion to look at the help-page ?LA_numerics
is a very good one. And it is possible to increase Maple's
Digits environment variable to greater than evalhf(Digits)
and then get access to versions of CLAPACK (or Nag) libraries
which are compiled for use with Maple's software floating-
point objects. As far as I know only Maple offers that, the
ability to solve such problems at arbitrary precision using
the same algorithm used in the double precision case (with
appropriately altered machine constants, naturally).
Lastly, if anyone who was privately sent it has the actual
8x8 complex Matrix data for the eigenproblem which is reportedly
solved so much better in Maple 8 than in Maple 7, and can
forward it to me, then I would be grateful.
cheers,
Dave Linder (WMI Math Developer)
|
[View Complete Thread]
Previous by date: [MUG] Re: Change default colors in odeplot, Allan Wittkopf
Next by date: [MUG] Re: How to control colors in plot3d (option shading), Robert Israel
Previous thread: [MUG] Displaying maples graphs in latex., Theo H S Boafo
Next thread: [MUG] How to control colors in plot3d (option shading), Erik Leunissen
|
|
|