aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2005-10-28 03:51:00 +0000
committerJay Belanger2005-10-28 03:51:00 +0000
commitcbd4e89beaf480605fc6b690a150c5382499e4f6 (patch)
tree8951bd0aa8200585b92a4aaa79a3167e97952784
parente069fa61e085d8be77a7f61cf7a1a74e1aafbf7a (diff)
downloademacs-cbd4e89beaf480605fc6b690a150c5382499e4f6.tar.gz
emacs-cbd4e89beaf480605fc6b690a150c5382499e4f6.zip
Add functions to autoloads.
(math-identity-matrix-p, math-ident-row-p): New functions.
-rw-r--r--lisp/calc/calc-ext.el33
1 files changed, 31 insertions, 2 deletions
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index db370f766d9..563bcd9b023 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -659,7 +659,7 @@
659 ("calc-alg" calc-has-rules math-defsimplify 659 ("calc-alg" calc-has-rules math-defsimplify
660calc-modify-simplify-mode calcFunc-collect calcFunc-esimplify 660calc-modify-simplify-mode calcFunc-collect calcFunc-esimplify
661calcFunc-islin calcFunc-islinnt calcFunc-lin calcFunc-linnt 661calcFunc-islin calcFunc-islinnt calcFunc-lin calcFunc-linnt
662calcFunc-simplify calcFunc-subst math-beforep 662calcFunc-simplify calcFunc-subst calcFunc-writeoutpower math-beforep
663math-build-polynomial-expr math-expand-formula math-expr-contains 663math-build-polynomial-expr math-expand-formula math-expr-contains
664math-expr-contains-count math-expr-depends math-expr-height 664math-expr-contains-count math-expr-depends math-expr-height
665math-expr-subst math-expr-weight math-integer-plus math-is-linear 665math-expr-subst math-expr-weight math-integer-plus math-is-linear
@@ -923,7 +923,7 @@ calc-force-refresh calc-locate-cursor-element calc-show-edit-buffer)
923 ("calc-alg" calc-alg-evaluate calc-apart calc-collect calc-expand 923 ("calc-alg" calc-alg-evaluate calc-apart calc-collect calc-expand
924calc-expand-formula calc-factor calc-normalize-rat calc-poly-div 924calc-expand-formula calc-factor calc-normalize-rat calc-poly-div
925calc-poly-div-rem calc-poly-gcd calc-poly-rem calc-simplify 925calc-poly-div-rem calc-poly-gcd calc-poly-rem calc-simplify
926calc-simplify-extended calc-substitute) 926calc-simplify-extended calc-substitute calc-writeoutpower)
927 927
928 ("calcalg2" calc-alt-summation calc-derivative 928 ("calcalg2" calc-alt-summation calc-derivative
929calc-dump-integral-cache calc-integral calc-num-integral 929calc-dump-integral-cache calc-integral calc-num-integral
@@ -2107,6 +2107,35 @@ calc-kill calc-kill-region calc-yank))))
2107 (and (cdr dims) 2107 (and (cdr dims)
2108 (= (car dims) (nth 1 dims))))) 2108 (= (car dims) (nth 1 dims)))))
2109 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)))
2138
2110;;; True if A is any scalar data object. [P x] 2139;;; True if A is any scalar data object. [P x]
2111(defun math-objectp (a) ; [Public] 2140(defun math-objectp (a) ; [Public]
2112 (or (integerp a) 2141 (or (integerp a)