Skip to content
Snippets Groups Projects
Commit 8c94bd93 authored by Liam Healy's avatar Liam Healy
Browse files

Invert the imaginary part in create-complex-matrix

The imaginary part of the elements in create-complex-matrix should be
inverted to match GSL's create_complex_matrix.  Now all LU tests
pass.
parent d9f88c38
No related branches found
No related tags found
No related merge requests found
;; Generate matrices used in tests of linear algebra functions ;; Generate matrices used in tests of linear algebra functions
;; Liam Healy 2009-09-19 18:28:31EDT matrix-generation.lisp ;; Liam Healy 2009-09-19 18:28:31EDT matrix-generation.lisp
;; Time-stamp: <2010-07-06 23:57:49EDT matrix-generation.lisp> ;; Time-stamp: <2010-08-12 22:48:01EDT matrix-generation.lisp>
;; ;;
;; Copyright 2009, 2010 Liam M. Healy ;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
(defun create-complex-matrix (dim) (defun create-complex-matrix (dim)
(create-matrix (create-matrix
(lambda (i j) (lambda (i j)
(complex (/ (+ 1 i j)) (+ 1/2 (expt i 2) (expt j 2)))) (complex (/ (+ 1 i j)) (/ (+ 1/2 (expt i 2) (expt j 2)))))
dim dim '(complex double-float))) dim dim '(complex double-float)))
(defun create-rhs-vector (dim &optional (element-type 'double-float)) (defun create-rhs-vector (dim &optional (element-type 'double-float))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment