I disagree that lmax should perform column-wise max. I certainly understand
that this is a useful and important operation, but I don't think it should
be the meaning of lmax, especially since Maxima doesn't allow 'max' on lists
(a.k.a. vectors).
-s
On Thu, Jul 1, 2010 at 12:42, Mario Rodriguez <biomates at telefonica.net>wrote:
>
> If there are no objections, I'll commit (minmax.lisp) the changes
> proposed by Barton and make the corresponding changes in the
> documentation and in the descriptive package:
>
>
>
> (defmacro opapply (op l)
> `(simplify (cons (list ,op) ,l)))
>
> (defun $lmax (x)
> (cond ((or ($listp x) ($setp x)) (opapply '$max (margs x)))
> (($matrixp x)
> (opapply 'mlist (mapcar #'(lambda (s) (opapply '$max s))
> (transpose (mcx (margs x))))))
> (t (merror "The argument to 'lmax' must be a list, set, or
> matrix."))))
>
> (defun $lmin (x)
> (cond ((or ($listp x) ($setp x)) (opapply '$min (margs x)))
> (($matrixp x)
> (opapply 'mlist (mapcar #'(lambda (s) (opapply '$min s))
> (transpose (mcx (margs x))))))
> (t (merror "The argument to 'lmin' must be a list, set, or
> matrix."))))
>
>
>
> mini & maxi will be removed from the documentation and transformed into
> lmin & lmax wrappers to maintain back portability.
>
> Thanks.
>
> --
> Mario
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>