it looks like eval1 is significantly more efficient than mvps in space,
but that mvps is significantly more efficient than eval1 in time, at
least for my example three variable polynomial:
arr=: 1 1 2 _1 1 (1 0 0;0 1 0;1 1 0;3 0 0;0 0 1)} 4 2 2$0
sarr=: 0 $. arr
mvps=: (5 $. [) +/@:*"1 |:@] */@:^"1/ 4 $. [
ev1=:(>@{. p."1 0 {:@>@{:) ; }:@>@{:
eval1=:([: >@{. ev1^:([EMAIL PROTECTED]@>@{:)^:_) @ ;
(6!:2,7!:2) 'arr&eval1"1 |: i.3 1000'
0.0412667 61440
(6!:2,7!:2) 'sarr mvps i.3 1000'
0.00400665 116736
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm