[lisplab-cvs] r190 - in trunk/src: matrix1 test
Jørn Inge Vestgården
jivestgarden at common-lisp.net
Sun Oct 24 10:17:43 UTC 2010
Author: jivestgarden
Date: Sun Oct 24 06:17:43 2010
New Revision: 190
Log:
bugfix
Modified:
trunk/src/matrix1/level1-funmat.lisp
trunk/src/matrix1/level1-sparse.lisp
trunk/src/test/scaling-test.lisp
trunk/src/test/test-methods.lisp
Modified: trunk/src/matrix1/level1-funmat.lisp
==============================================================================
--- trunk/src/matrix1/level1-funmat.lisp (original)
+++ trunk/src/matrix1/level1-funmat.lisp Sun Oct 24 06:17:43 2010
@@ -22,7 +22,7 @@
;;; Function matrices (matrices without a store)
(defclass function-matrix
- (structure-general element-base implementation-base)
+ (structure-general element-base implementation-base vector-base)
((mref
:initarg :mref
:initform (constantly 0)
Modified: trunk/src/matrix1/level1-sparse.lisp
==============================================================================
--- trunk/src/matrix1/level1-sparse.lisp (original)
+++ trunk/src/matrix1/level1-sparse.lisp Sun Oct 24 06:17:43 2010
@@ -24,7 +24,7 @@
(in-package :lisplab)
(defclass matrix-sparse
- (structure-general element-base implementation-lisp)
+ (structure-general element-base implementation-lisp vector-base)
((hash-store
:initarg :store
:initform nil
Modified: trunk/src/test/scaling-test.lisp
==============================================================================
--- trunk/src/test/scaling-test.lisp (original)
+++ trunk/src/test/scaling-test.lisp Sun Oct 24 06:17:43 2010
@@ -1,6 +1,8 @@
-;;; Test the scaling of various lisplab methods
-;;; by creating a gnuplot script
-;;; The purpose is to see if the performance is ok.
+;;; Test the scaling of various lisplab methods to see
+;;; if performance is OK.
+;;;
+;;; Outputs a gnuplot script.
+;;; Open gnuplot and load the file.
;;; Findings:
;;; o The complex functions are very slow
@@ -28,6 +30,7 @@
(with-open-file (out file :direction :output :if-exists :supersede)
(format out "set logscale x~%")
(format out "set logscale y~%")
+ (format out "set key left~%")
(format out "plot ")
(mapc (lambda (title next)
(format out " '-' ti '~a' w lp, " title))
@@ -62,9 +65,9 @@
'(mmax mmin mabsmax mabsmin ll::mminmax))
(defun report-function-times (filename &key
- (ns '(1 2 3 4 5 10 20 50 100 150 200 300 400 500))
+ (ns '(10 20 50 100 250 500))
(avg 10)
- (funs (ordinary-functions))
+ (funs (ordinary-functions))
(titles (mapcar #'symbol-name funs))
(mats (mapcar (lambda (n) (drandom N N)) ns)))
(let* ((times (time-functions funs (mapcar #'list mats) avg)))
@@ -78,12 +81,12 @@
'(.+ .- .* ./ .^ .max .min .= ./= .< .> .<= .>=))
(defun report-operator-times (filename &key
- (ns '(1 2 3 4 5 10 20 50 100 150 200 300 400 500))
+ (ns '(10 20 50 100 250 500))
(avg 10)
(funs (ordinary-operators-real))
(titles (mapcar #'symbol-name funs))
(lmats (mapcar (lambda (n) (drandom N N)) ns))
- (rmats lmats))
+ (rmats (mapcar (lambda (n) (drandom N N)) ns)))
(let* ((times (time-functions funs (mapcar #'list lmats rmats) avg)))
(write-gnuplot-scaling filename ns times titles)
:end))
Modified: trunk/src/test/test-methods.lisp
==============================================================================
--- trunk/src/test/test-methods.lisp (original)
+++ trunk/src/test/test-methods.lisp Sun Oct 24 06:17:43 2010
@@ -24,7 +24,7 @@
(c %i)
(x #md((1 2 ) (3 4)))
(y #md((1 2 3) (3 4 3)))
- (w #mm((1 2 2) (3 4 3) (1 100000 1000000))
+ (w #mm((1 2 2) (3 4 3) (1 100000 1000000)))
(args (list a b c x y w)))
(mapc (lambda (fun)
(mapc (lambda (x)
@@ -60,6 +60,7 @@
(mapc (lambda (x) (simple-non-nil-check '.besk (list 7.1 x))) args)
(mapc (lambda (x) (simple-non-nil-check '.besh1 (list 7.1 x))) args)
(mapc (lambda (x) (simple-non-nil-check '.besh2 (list 7.1 x))) args)
+
'done))
More information about the lisplab-cvs
mailing list