Show
Ignore:
Timestamp:
2005年11月01日 07時08分22秒 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • vendor/emacs-CVS_HEAD/lisp/calc/calc-ext.el

    r3799 r3939  
    660660calc-modify-simplify-mode calcFunc-collect calcFunc-esimplify 
    661661calcFunc-islin calcFunc-islinnt calcFunc-lin calcFunc-linnt 
    662 calcFunc-simplify calcFunc-subst math-beforep 
     662calcFunc-simplify calcFunc-subst calcFunc-writeoutpower math-beforep 
    663663math-build-polynomial-expr math-expand-formula math-expr-contains 
    664664math-expr-contains-count math-expr-depends math-expr-height 
     
    924924calc-expand-formula calc-factor calc-normalize-rat calc-poly-div 
    925925calc-poly-div-rem calc-poly-gcd calc-poly-rem calc-simplify 
    926 calc-simplify-extended calc-substitute
     926calc-simplify-extended calc-substitute calc-writeoutpower
    927927 
    928928 ("calcalg2" calc-alt-summation calc-derivative 
     
    21072107    (and (cdr dims) 
    21082108         (= (car dims) (nth 1 dims))))) 
     2109 
     2110;;; True if MAT is an identity matrix. 
     2111(defun math-identity-matrix-p (mat &optional mul) 
     2112  (if (math-square-matrixp mat) 
     2113      (let ((a (if mul 
     2114                   (nth 1 (nth 1 mat)) 
     2115                 1)) 
     2116            (n (1- (length mat))) 
     2117            (i 1)) 
     2118        (while (and (<= i n) 
     2119                    (math-ident-row-p (nth i mat) i a)) 
     2120          (setq i (1+ i))) 
     2121        (if (> i n) 
     2122            a 
     2123          nil)))) 
     2124 
     2125(defun math-ident-row-p (row n &optional a) 
     2126  (unless a 
     2127    (setq a 1)) 
     2128  (and 
     2129   (not (memq nil (mapcar  
     2130                   (lambda (x) (eq x 0)) 
     2131                   (nthcdr (1+ n) row)))) 
     2132   (not (memq nil (mapcar  
     2133                   (lambda (x) (eq x 0)) 
     2134                   (butlast  
     2135                    (cdr row) 
     2136                    (- (length row) n))))) 
     2137   (eq (elt row n) a))) 
    21092138 
    21102139;;; True if A is any scalar data object.  [P x]