Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better logic. fixed typo for symmetric predicate.

Signed-off-by: AJ Rossini <blindglobe@gmail.com>
  • Loading branch information...
commit 2eb2244f1ea261682ff88092593f48f617188426 1 parent ccd3573
@blindglobe authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/numerical-linear-algebra.lisp
View
10 src/numerical-linear-algebra.lisp
@@ -1,6 +1,6 @@
;;; -*- mode: lisp -*-
-;;; Time-stamp: <2009-06-11 08:36:15 tony>
+;;; Time-stamp: <2009-06-12 07:53:10 tony>
;;; Creation: <2009-02-05 11:18:51 tony>
;;; File: numerical.linear.algebra.lisp
;;; Author: AJ Rossini <blindglobe@gmail.com>
@@ -53,12 +53,12 @@
|#
(:method ((a matrix-like) &key (by :qr)) ;; is this the right way to get :qr as default?
(make-instance 'factorized-matrix-results
- :results (ecase by
+ :results (case by
(:qr (geqrf a))
(:lu (getrf a))
(:cholesky (potrf a))
- (:svd (gesvf a))
- (nil a))
+ (:svd (gesvd a))
+ (otherwise a))
:type by)))
(defgeneric invert (a &optional by)
@@ -81,7 +81,7 @@
(let ((results (ecase by
(:qr (minv-qr a) )
(:lu (minv-lu a))
- (:cholesky (if (symmetric-p a)
+ (:cholesky (if (matrix-like-symmetric-p a)
(minv-cholesky a)
(error "Cholesky only works for symmetric matrices.")))
(:svd (gesvi a))
Please sign in to comment.
Something went wrong with that request. Please try again.