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
;; Generate matrices used in tests of linear algebra functions
;; 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
;; Distributed under the terms of the GNU General Public License
......@@ -87,7 +87,7 @@
(defun create-complex-matrix (dim)
(create-matrix
(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)))
(defun create-rhs-vector (dim &optional (element-type 'double-float))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment