view lisp/calc/calc-mtx.el @ 48951:d77bc55dd27b
(custom-known-themes): New variable.
(custom-declare-theme): New function.
(deftheme): New macro.
(custom-make-theme-feature): New function.
(custom-theme-p): New function.
(custom-check-theme): New function.
(custom-push-theme): New function.
(custom-theme-set-variables): Take themes into account.
(custom-loaded-themes): New variable.
(custom-theme-loaded-p): New function.
(provide-theme): New function.
(require-theme): New function.
(custom-remove-theme): New function.
(custom-do-theme-reset): New function.
(custom-theme-load-themes): New function.
(custom-load-themes): New function.
(custom-theme-value): New function.
(custom-theme-variable-value): New function.
(custom-theme-reset-internal): New function.
(custom-theme-reset-variables): New function.
(custom-reset-variables): New function.
author
Richard M. Stallman <rms@gnu.org>
date
Mon, 23 Dec 2002 18:40:55 +0000 (2002-12-23)
parents
0f4506820432
children
f4d68f97221e
line source
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; calc-mtx.el --- matrix functions for Calc
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; Author: David Gillespie <daveg@synaptics.com>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; Maintainer: Colin Walters <walters@debian.org>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; This file is part of GNU Emacs.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; GNU Emacs is distributed in the hope that it will be useful,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; but WITHOUT ANY WARRANTY. No author or distributor
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; accepts responsibility to anyone for the consequences of using it
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; or for whether it serves any particular purpose or works at all,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; unless he says so in writing. Refer to the GNU Emacs General Public
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; License for full details.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; Everyone is granted permission to copy, modify and redistribute
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; GNU Emacs, but only under the conditions described in the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; GNU Emacs General Public License. A copy of this license is
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; supposed to have been given to you along with GNU Emacs so you
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; can know your rights and responsibilities. It should be in a
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; file named COPYING. Among other things, the copyright notice
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; and this notice must be preserved on all copies.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Commentary:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Code:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;; This file is autoloaded from calc-ext.el.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (require 'calc-ext)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (require 'calc-macs)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun calc-Need-calc-mat () nil)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun calc-mdet (arg)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (interactive "P")
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (calc-slow-wrapper
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (calc-unary-op "mdet" 'calcFunc-det arg)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun calc-mtrace (arg)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (interactive "P")
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (calc-slow-wrapper
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (calc-unary-op "mtr" 'calcFunc-tr arg)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun calc-mlud (arg)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (interactive "P")
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (calc-slow-wrapper
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (calc-unary-op "mlud" 'calcFunc-lud arg)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Coerce row vector A to be a matrix. [V V]
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-row-matrix (a)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (and (Math-vectorp a)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (not (math-matrixp a)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec a)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 a))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Coerce column vector A to be a matrix. [V V]
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-col-matrix (a)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (and (Math-vectorp a)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (not (math-matrixp a)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cons 'vec (mapcar (function (lambda (x) (list 'vec x))) (cdr a)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 a))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Multiply matrices A and B. [V V V]
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-mul-mats (a b)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((mat nil)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cols (length (nth 1 b)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 row col ap bp accum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (setq a (cdr a))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq col cols
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 row nil)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (> (setq col (1- col)) 0)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq ap (cdr (car a))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 bp (cdr b)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 accum (math-mul (car ap) (nth col (car bp))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (setq ap (cdr ap) bp (cdr bp))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq accum (math-add accum (math-mul (car ap) (nth col (car bp))))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq row (cons accum row)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq mat (cons (cons 'vec row) mat)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cons 'vec (nreverse mat))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-mul-mat-vec (a b)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cons 'vec (mapcar (function (lambda (row)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-dot-product row b)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cdr a))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun calcFunc-tr (mat) ; [Public]
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (math-square-matrixp mat)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-matrix-trace-step 2 (1- (length mat)) mat (nth 1 (nth 1 mat)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-reject-arg mat 'square-matrixp)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-matrix-trace-step (n size mat sum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (<= n size)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-matrix-trace-step (1+ n) size mat
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-add sum (nth n (nth n mat))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 sum))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Matrix inverse and determinant.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-matrix-inv-raw (m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((n (1- (length m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (<= n 3)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((det (math-det-raw m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (and (not (math-zerop det))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-div
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cond ((= n 1) 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ((= n 2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-neg (nth 2 (nth 1 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-neg (nth 1 (nth 2 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 1 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ((= n 3)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 3 (nth 3 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 2 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 3 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 3 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 3 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 3 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 1 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 3 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 1 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 2 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 3 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 3 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 3 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 2 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 3 (nth 3 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 1 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 3 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 3 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 2 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 1 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 2 (nth 3 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 2 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 3 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 2 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 3 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 3 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 1 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 2 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 1 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 2 m))))))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 det)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((lud (math-matrix-lud m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (and lud
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-lud-solve lud (calcFunc-idn 1 n)))))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun calcFunc-det (m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (math-square-matrixp m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-with-extra-prec 2 (math-det-raw m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (and (eq (car-safe m) 'calcFunc-idn)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (or (math-zerop (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-equal-int (nth 1 m) 1)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-reject-arg m 'square-matrixp))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-det-raw (m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((n (1- (length m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cond ((= n 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 1 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ((= n 2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub (math-mul (nth 1 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 2 m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 2 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ((= n 3)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-sub
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-add
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-add
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 1 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 3 (nth 3 m))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 3 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 1 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 3 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 1 (nth 3 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 1 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 3 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 2 (nth 3 m)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 2 (nth 1 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-mul (nth 1 (nth 2 m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth 3 (nth 3 m))))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (t (let ((lud (math-matrix-lud m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if lud
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((lu (car lud)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-det-step n (nth 2 lud)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0))))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-det-step (n prod)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (> n 0)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-det-step (1- n) (math-mul prod (nth n (nth n lu))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 prod))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; This returns a list (LU index d), or nil if not possible.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Argument M must be a square matrix.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defvar math-lud-cache nil)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-matrix-lud (m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((old (assoc m math-lud-cache))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (context (list calc-internal-prec calc-prefer-frac)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (and old (equal (nth 1 old) context))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (cdr (cdr old))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let* ((lud (catch 'singular (math-do-matrix-lud m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (entry (cons context lud)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if old
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcdr old entry)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq math-lud-cache (cons (cons m entry) math-lud-cache)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lud))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; Numerical Recipes section 2.3; implicit pivoting omitted.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-do-matrix-lud (m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let* ((lu (math-copy-matrix m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (n (1- (length lu)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 i (j 1) k imax sum big
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (d 1) (index nil))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= j n)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i 1
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 big 0
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 imax j)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (< i j)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-working "LUD step" (format "%d/%d" j i))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq sum (nth j (nth i lu))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 k 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (< k i)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq sum (math-sub sum (math-mul (nth k (nth i lu))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth j (nth k lu))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 k (1+ k)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr j (nth i lu)) sum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i (1+ i)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= i n)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-working "LUD step" (format "%d/%d" j i))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq sum (nth j (nth i lu))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 k 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (< k j)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq sum (math-sub sum (math-mul (nth k (nth i lu))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth j (nth k lu))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 k (1+ k)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr j (nth i lu)) sum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((dum (math-abs-approx sum)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (Math-lessp big dum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq big dum
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 imax i)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i (1+ i)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (> imax j)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq lu (math-swap-rows lu j imax)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 d (- d)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq index (cons imax index))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((pivot (nth j (nth j lu))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (math-zerop pivot)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (throw 'singular nil)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i j)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= (setq i (1+ i)) n)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr j (nth i lu))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-div (nth j (nth i lu)) pivot)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq j (1+ j)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list lu (nreverse index) d)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-swap-rows (m r1 r2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (or (= r1 r2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let* ((r1prev (nthcdr (1- r1) m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (row1 (cdr r1prev))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (r2prev (nthcdr (1- r2) m))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (row2 (cdr r2prev))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (r2next (cdr row2)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcdr r2prev row1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcdr r1prev row2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcdr row2 (cdr row1))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcdr row1 r2next)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun math-lud-solve (lud b &optional need)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if lud
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let* ((x (math-copy-matrix b))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (n (1- (length x)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (m (1- (length (nth 1 x))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (lu (car lud))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (col 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 i j ip ii index sum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= col m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-working "LUD solver step" col)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i 1
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ii nil
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 index (nth 1 lud))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= i n)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq ip (car index)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 index (cdr index)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 sum (nth col (nth ip x)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr col (nth ip x)) (nth col (nth i x)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (null ii)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (or (math-zerop sum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq ii i))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq j ii)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (< j i)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq sum (math-sub sum (math-mul (nth j (nth i lu))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth col (nth j x))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 j (1+ j))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr col (nth i x)) sum)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i (1+ i)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (>= (setq i (1- i)) 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq sum (nth col (nth i x))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 j i)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= (setq j (1+ j)) n)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq sum (math-sub sum (math-mul (nth j (nth i lu))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nth col (nth j x))))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr col (nth i x))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-div sum (nth i (nth i lu)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq col (1+ col)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 x)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (and need
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-reject-arg need "*Singular matrix"))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (defun calcFunc-lud (m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (if (math-square-matrixp m)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (or (math-with-extra-prec 2
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((lud (math-matrix-lud m)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (and lud
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let* ((lmat (math-copy-matrix (car lud)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (umat (math-copy-matrix (car lud)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (n (1- (length (car lud))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (perm (calcFunc-idn 1 n))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 i (j 1))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= j n)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (< i j)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr j (nth i lmat)) 0)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq i (1+ i)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr j (nth j lmat)) 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (<= (setq i (1+ i)) n)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setcar (nthcdr j (nth i umat)) 0))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq j (1+ j)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (while (>= (setq j (1- j)) 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (let ((pos (nth (1- j) (nth 1 lud))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (or (= pos j)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (setq perm (math-swap-rows perm j pos)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (list 'vec perm lmat umat)))))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-reject-arg m "*Singular matrix"))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (math-reject-arg m 'square-matrixp)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;;; calc-mtx.el ends here