On Tue, Jun 12, 2012 at 10:41 AM, Henry Rich <henryhr...@nc.rr.com> wrote:
> That may be.  But no way do you do a determinant with just one multiply
> - it takes 0 for a 1x1, 2 for a 2x2.

You are thinking about scalars.

   -/ .(*&([smoutput)) i. 2 2
3 1
0 2
_2

Here, we are computing 0 2 * 3 1

This is what I mean by "one multiply".

You are correct that if I investigated at rank 0 that there would be
two multiplies.

> The definition of DET is so quirky that it makes sense only when you
> have subtraction/ . multiplication

All I had to do to make it behave like the implementation was terminate
recursion when derived lists contain 1 element instead of 0 elements.

> for suitably defined operations on
> the space of interest.  Even +/ . *  runs in factorial time.  For the
> case of finding the characteristic polynomial, why not just use the verb
> definitions I gave earlier, rather than requiring a new DET?

Which verb?

Anyways, one issue here is whether the dictionary and the
implementation agree.  Currently, they do not.  But I currently see no
value in using the dictionary definition over the actual
implementation -- they are equivalent for -/ .* and I have not found a
useful case where the dictionary DET does something meaningful that
the implementation does not.

Another issue here is generality, and motivation.  There is something
nice about being able to use the same "determinant primitive" to
compute both regular determinants and eigenvalues.  And even if that
never gets into the interpreter, I find some joy in modeling things
that way.

The "resource cost" issue you are raising can be significant, in some
contexts, but it's not going to be significant in all contexts.  In
the case I am working up to dealing with (several hundred collections
4x4 matrices where each collection typically contains of several
thousand of these 4x4 matrices), it's hard for me to see why I should
care about it.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to