[lisplab-cvs] r159 - in trunk/src: core matrix

Jørn Inge Vestgården jivestgarden at common-lisp.net
Thu May 13 13:46:11 UTC 2010


Author: jivestgarden
Date: Thu May 13 09:46:10 2010
New Revision: 159

Log:
removed unused code

Modified:
   trunk/src/core/level0-interface.lisp
   trunk/src/matrix/level1-constructors.lisp
   trunk/src/matrix/level1-ddiag.lisp
   trunk/src/matrix/level1-dge.lisp
   trunk/src/matrix/level1-dgt.lisp
   trunk/src/matrix/level1-ge.lisp
   trunk/src/matrix/level1-zge.lisp
   trunk/src/matrix/level2-matrix-zge.lisp

Modified: trunk/src/core/level0-interface.lisp
==============================================================================
--- trunk/src/core/level0-interface.lisp	(original)
+++ trunk/src/core/level0-interface.lisp	Thu May 13 09:46:10 2010
@@ -20,15 +20,6 @@
 
 (in-package :lisplab)
 
-#+nil (defgeneric type-spec (object)
-  (:documentation "Some symbolic representation of the type."))
-
-#+nil (defgeneric function-output-type-spec (fun input-spec)
-  (:documentation "Desides an output for the function with the given intput spec."))
-
-#+nil (defgeneric operator-output-type-spec (fun input-spec1 input-spec2)
-  (:documentation "Desides an output for the operator with the two given inputs."))
-      
 (defgeneric init-threads (num-threads)
   (:documentation "Request to use a certain number of threads for calculations."))
 

Modified: trunk/src/matrix/level1-constructors.lisp
==============================================================================
--- trunk/src/matrix/level1-constructors.lisp	(original)
+++ trunk/src/matrix/level1-constructors.lisp	Thu May 13 09:46:10 2010
@@ -43,110 +43,4 @@
 (defmethod make-matrix-instance ((description list) dim value)
   (assert (= 3 (length description)))
   (make-matrix-instance (apply #'make-matrix-class description)
-			dim value))
-
-
-
-
-#|
-
-
-
-;; Hm jeg trenger ikke denne kompliserte greia for operatorer 
-;; Disse trenger bare virke like for like...
-
-;;; Rydd opp: denne finlen bør bare ha construcucrene med spec.
-;;; Fjern alt som har med spec å gjøre andre steder..
-;;; Trenger mer generelt enn mcreate . Noe som også tillater oppgradering 
-;;; elementer ...
-
-(defgeneric find-function-output-class (fun input-class))
-
-(defgeneric find-operator-output-class (fun input-class1 input-class2))
-
-(defgeneric find-element-type-combination-class (op element-type1 element-type2))
-
-(defgeneric find-implementation-combination-class (op impl1 impl2))
-
-(defgeneric find-implementation-combination-class (op structure1 structure2))
-
-;;; Methods
-
-(defmethod find-function-output-class (fun input-class)
-  (make-matrix-class  (find-class (element-type-class-name input-class))
-		      (find-class (structure-class-name input-class))
-		      (find-class (implementation-class-name input-class))))
-
-(defmethod find-operator-output-class (fun input-class)
-  (make-matrix-class  (find-class (element-type-class-name input-class))
-		      (find-class (structure-class-name input-class))
-		      (find-class (implementation-class-name input-class))))
-
-
-
-
-
-
-;; A scheme for matrix creations
-
-(defvar *matrix-class-to-description* (make-hash-table))
-(defvar *matrix-description-to-class* (make-hash-table :test #'equal))
-
-(defun add-matrix-class (class element-type structure implementation)
-  (setf (gethash (list element-type structure implementation)
-		 *matrix-description-to-class*)
-	class
-	(gethash class 
-		 *matrix-class-to-description* )
-	(list element-type structure implementation)))
-
-(defun find-matrix-class (description)
-  (let* ((entry (gethash description
-		*matrix-description-to-class*)))	 
-    (unless entry
-      (error "No matrix of structure ~a." description))
-    entry))
-
-(defun find-matrix-description (class)
-   (let* ((entry (gethash class
-			  *matrix-class-to-description*)))
-    (unless entry
-      (error "No matrix description of class ~a." class))
-    entry))
-
-(defun create-matrix-description (obj &key et s i)
-  "A simple language to modify matrix descriptions. Uses 
-the obejct as foundation of the description, but you can
-override the description with the keywords."
-  (let ((d0 (find-matrix-description (class-name (class-of obj)))))
-    (list
-     (if et et (first d0))
-     (if s s (second d0))
-     (if i i (third d0)))))
-
-;;; The implementaiton of the level0 generic functions
-
-(defmethod type-spec ((obj matrix-base))
-  (find-matrix-description (class-name (class-of obj))))
-
-(defmethod function-output-type-spec (fun (input-spec list))
-  ;;; A list signifies a matrix, Should be a another type of obejct at some point!
-  (cons (function-output-type-spec fun (car input-spec))
-	(cdr input-spec)))
-
-(defmethod operator-output-type-spec (fun (a list) b)
-  ;;; A list signifies a matrix, Should be a another type of obejct at some point!
-  (cons (operator-output-type-spec fun (car a) b)
-	(cdr a)))
-
-(defmethod operator-output-type-spec (fun a (b list))
-  ;;; A list signifies a matrix, Should be a another type of obejct at some point!
-  (cons (operator-output-type-spec fun a (car b))
-	(cdr b)))
-
-(defmethod operator-output-type-spec (fun (a list) (b list))
-  ;;; A list signifies a matrix, Should be a another type of obejct at some point!
-  ;; TODO: some better way to choose 
-  (cons (operator-output-type-spec fun (car a) (car b))
-	(cdr a)))
-|#
\ No newline at end of file
+			dim value))
\ No newline at end of file

Modified: trunk/src/matrix/level1-ddiag.lisp
==============================================================================
--- trunk/src/matrix/level1-ddiag.lisp	(original)
+++ trunk/src/matrix/level1-ddiag.lisp	Thu May 13 09:46:10 2010
@@ -63,13 +63,6 @@
 (defmethod make-matrix-class ((a (eql :d)) (b (eql :di)) (c (eql :any)))
   (find-class 'matrix-ddi))
 
-
-;;; Add classes to the generic matrix creation scheme
-#+todo-remove(add-matrix-class 'matrix-base-ddi :d :di :base)
-#+todo-remove(add-matrix-class 'matrix-lisp-ddi :d :di :lisp)
-#+todo-remove(add-matrix-class 'matrix-blas-ddi :d :di :blas)
-#+todo-remove(add-matrix-class 'matrix-ddi :d :di :any)
-
 ;;; Methods spezilied for the diagnoal matrices
 
 (defmethod mref ((matrix matrix-base-ddi) row col)

Modified: trunk/src/matrix/level1-dge.lisp
==============================================================================
--- trunk/src/matrix/level1-dge.lisp	(original)
+++ trunk/src/matrix/level1-dge.lisp	Thu May 13 09:46:10 2010
@@ -66,13 +66,6 @@
 (defmethod make-matrix-class ((a (eql :d)) (b (eql :ge)) (c (eql :any)))
   (find-class 'matrix-dge))
 
-
-;;; Add classes to the generic matrix creation scheme
-#+todo-remove (add-matrix-class 'matrix-base-dge :d :ge :base)
-#+todo-remove (add-matrix-class 'matrix-lisp-dge :d :ge :lisp)
-#+todo-remove (add-matrix-class 'matrix-blas-dge :d :ge :blas)
-#+todo-remove (add-matrix-class 'matrix-dge :d :ge :any)
-
 ;;; All leve1 methods spcialized for dge
 
 (defmethod mref ((matrix matrix-base-dge) row col)

Modified: trunk/src/matrix/level1-dgt.lisp
==============================================================================
--- trunk/src/matrix/level1-dgt.lisp	(original)
+++ trunk/src/matrix/level1-dgt.lisp	Thu May 13 09:46:10 2010
@@ -82,13 +82,6 @@
 (defmethod make-matrix-class ((a (eql :d)) (b (eql :gt)) (c (eql :any)))
   (find-class 'matrix-dgt))
 
-
-;;; Add classes to the generic matrix creation scheme
-#+todo-remove (add-matrix-class 'matrix-base-dgt :d :gt :base)
-#+todo-remove (add-matrix-class 'matrix-lisp-dgt :d :gt :lisp)
-#+todo-remove (add-matrix-class 'matrix-blas-dgt :d :gt :blas)
-#+todo-remove (add-matrix-class 'matrix-dgt :d :gt :any)
-
 ;;; Methods spezilied for the tridiagnoal matrices
 
 (defmethod mref ((matrix matrix-base-dgt) row col)

Modified: trunk/src/matrix/level1-ge.lisp
==============================================================================
--- trunk/src/matrix/level1-ge.lisp	(original)
+++ trunk/src/matrix/level1-ge.lisp	Thu May 13 09:46:10 2010
@@ -33,10 +33,6 @@
 (defmethod make-matrix-class ((a (eql :any)) (b (eql :ge)) (c (eql :any)))
   (find-class 'matrix-ge))
 
-;;; Add class to the generic matrix creation scheme
-#+todo-remove (add-matrix-class 'matrix-base-ge :any :ge :base)
-#+tod-remove (add-matrix-class 'matrix-ge :any :ge :any)
-
 (defmethod initialize-instance :after ((m matrix-ge) &key dim (value 0))
   (with-slots (rows cols size matrix-store) m
     (setf rows (car dim)

Modified: trunk/src/matrix/level1-zge.lisp
==============================================================================
--- trunk/src/matrix/level1-zge.lisp	(original)
+++ trunk/src/matrix/level1-zge.lisp	Thu May 13 09:46:10 2010
@@ -64,14 +64,6 @@
 (defmethod make-matrix-class ((a (eql :z)) (b (eql :ge)) (c (eql :any)))
   (find-class 'matrix-zge))
 
-
-;;; Add classes to the generic matrix creation scheme
-#+todo-remove (add-matrix-class 'matrix-base-zge :z :ge :base)
-#+todo-remove (add-matrix-class 'matrix-lisp-zge :z :ge :lisp)
-#+todo-remove (add-matrix-class 'matrix-blas-zge :z :ge :blas)
-#+todo-remove (add-matrix-class 'matrix-zge :z :ge :any)
-
-
 ;;; Level1 methods specialized for zge
 
 (defmethod mref ((matrix matrix-base-zge) row col)

Modified: trunk/src/matrix/level2-matrix-zge.lisp
==============================================================================
--- trunk/src/matrix/level2-matrix-zge.lisp	(original)
+++ trunk/src/matrix/level2-matrix-zge.lisp	Thu May 13 09:46:10 2010
@@ -171,31 +171,6 @@
 
 ;;;; The cross terms, where one input is a real matrix, the other complex
 
-#|
-(defmacro def-cross-complex-real-method (name)
-  ;; Assumes output type same as input
-  ;; Note will crash if input is not converted properly!!!!!!
-  (let ((a (gensym))
-	(b (gensym)))
-    `(defmethod ,name ((,a matrix-base-zge) (,b matrix-base-dge))
-       ;; This is not the fastest possible, but rather fast
-       (,name ,a (.complex ,b 0)))))
-
-(defmacro def-all-cross-complex-real-methods (name)
-  `(progn
-     (def-cross-complex-real-method ,name)
-     #+nil (def-cross-complex-real-method ,name matrix-base-dge complex)
-   ;;  (def-cross-complex-real-method ,name matrix-base-zge matrix-base-dge)
-   ;;  (def-cross-complex-real-method ,name matrix-base-dge matrix-base-zge)
-     'done))
-
-(def-all-cross-complex-real-methods .add)
-(def-all-cross-complex-real-methods .sub)
-(def-all-cross-complex-real-methods .mul)
-(def-all-cross-complex-real-methods .div)
-(def-all-cross-complex-real-methods .expt)
-|#
-
 ;;; Add
 
 (defmethod .add ((a matrix-base-dge) (b complex))




More information about the lisplab-cvs mailing list