bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Matrix native function


From: Dr . Jürgen Sauermann
Subject: Re: Matrix native function
Date: Sat, 2 Nov 2024 16:21:43 +0100
User-agent: Mozilla Thunderbird

Hi Henrik,

thanks, see below.

On 11/2/24 15:15, Henrik Moller wrote:
Your call, of course, but something like ⎕MX[f] might be useful.
Also a possibility. My thinking about ⌹ as opposed to e,g, ⎕MX (or ⎕GSL as a reference to the GNU libray ?)
was that currently ⌹ contains all linear-algebra related funtions. Maybe we could hear some opinions from
other GNU APL users?
The functions I've included in mtx are ones I've found useful for doing 3D modelling, animation, and similar things, but there are lots of others that might be worth considering and that could be added as necessary, a kind of ⎕FIO collection.
Agreed. We could start small and extend over time.

Looking at your configure.ac, you don't seem to be relying on any external libraries,
thats not quite correct. GNU APL may support many libraries but I have put quite some
effort into making the nice to have one optional. There are checks for those libraries, but
not in conficure.ac but in the m4 subdirectory (which is included from configure.ac).
but mtx links the GNU gsl package and linking the lapack library might be an option.
Would this be a problem?
In principle not. However at the time when I wrote the first ⌹ functions I saw that liblapack was a pretty large
beast of while only a small subset was actually needed.And I wanted the core APL functionality (to which ⌹ belongs)
to be independent of any non-standard libraries (so that it would compile on all platforms.

If you like, I'll port mtx as a ⎕MX extension and send you a patch.

Thanks, great. Expect some rework on my side.
Henrik

On 11/2/24 08:14, Dr. Jürgen Sauermann wrote:
Hi Hendrik,

I am wondering if it may make sense to make those functions built-ins?

As of today only QR-factorization is built-in but I always felt that that
may be too little (at least if compared to packages like e.g. LApack),

with f being a function selector or a function name like in ⎕FX and ⎕CR.

Best Regards,
Jürgen


All these functions could be accessed as either ⌹[f]B or as A[f]B
On 10/30/24 15:58, Henrik Moller wrote:
Earlier this year, I put a native function package, catted "mtx," on GitHub.  I've no idea if anyone is using it, but I just put up a new release.  The biggest change is that the new version uses the GNU gsl library rather than an ad-hoc eigensystems package I used in the first release, so the new version is easier to install. 

A new feature is some massaging of the covariance and eigensystems code to allow principal component analysis of statistical data*--see the README for an example.  That's in addition to the existing capabilities:

  • Matrix determinants
  • Matrix eigenvalues and eigenvectors
  • Identity matrices
  • Vector cross products
  • Vector interior angles
  • Vector or scalar rotation matrices
  • Gaussian complex random values
  • Vector/matrix normalisation
  • Homogeneous matrices
  • Covariance
Anyway, it's at github.com/ChrisMoller/mtx

* One of my sons is a medical physicist  and one the newer things in that is using PCA to use sampled radiomic data to model the shapes of cancerous regions.  He asked me for the capability, but I have no idea how useful it will be for anyone else.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]