Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more improvements to xarray interface, not done yet, though.

Signed-off-by: AJ Rossini <blindglobe@gmail.com>
  • Loading branch information...
commit 0ae7a85dda4a5cf6bdb391dfe8891e9f40399130 1 parent 9dc6a2f
@blindglobe authored
Showing with 25 additions and 29 deletions.
  1. +25 −29 src/xarray-lispmatrix.lisp
View
54 src/xarray-lispmatrix.lisp
@@ -1,13 +1,13 @@
;;; -*- mode: lisp -*-
-;;; Time-stamp: <2009-06-26 08:13:36 tony>
+;;; Time-stamp: <2009-09-19 23:27:09 tony>
;;; Creation: <2009-06-26 07:57:23 tony>
;;; File: xarray-lispmatrix.lisp
;;; Author: AJ Rossini <blindglobe@gmail.com>
;;; Copyright: (c)2009--, AJ Rossini. BSD, LLGPL, or GPLv2, depending
;;; on how it arrives.
-;;; Purpose: Integration with xarray for a common array-like
-;;; indexing approach.
+;;; Purpose: Integration with xarray to provide a common CLOS-based
+;;; array-like indexing approach.
;;; What is this talk of 'release'? Klingons do not make software
;;; 'releases'. Our software 'escapes', leaving a bloody trail of
@@ -16,41 +16,37 @@
;;; This organization and structure is new to the 21st Century
;;; version.. Think, "21st Century Schizoid Man".
-
(in-package :lisp-matrix)
-;; need to condition on the existence of and accessibility of xarray,
+;; might need to condition on the existence of and accessibility of xarray,
;; something like:
-
-(when (find-package 'xarray)
-
+#|
+ (when (find-package 'xarray)
(defmethod xtype ((object matrix-like)))
+ .... )
+|#
- (defmethod xrank ((object matrix-like)))
-
- (defmethod xdims ((object matrix-like)))
-
- ;; (defmethod xdims*) can just use the default method.
-
- (defmethod xdim ((object matrix-like)))
-
- (defmethod xsize ((object matrix-like)))
-
- (defmethod xref-writable-p ((object matrix-like) &rest subscripts))
-
- (defmethod xref ((object matrix-like) &rest subscripts))
-
- (defmethod (setf xref) (value (object matrix-like) &rest subscripts))
-
- ;; there is a default method that should suffice, but perhaps some
+(defmethod xtype ((object matrix-like))
+ (warning "Not implemented for matrix-like"))
+
+(defmethod xrank ((object matrix-like)))
+(defmethod xdims ((object matrix-like)))
+;; (defmethod xdims*) can just use the default method.
+(defmethod xdim ((object matrix-like)))
+(defmethod xsize ((object matrix-like)))
+(defmethod xref-writable-p ((object matrix-like) &rest subscripts)
+ "Always true for matrix-like derived classes at this point (right?)"
+ t)
+(defmethod xref ((object matrix-like) &rest subscripts))
+(defmethod (setf xref) (value (object matrix-like) &rest subscripts))
+;; there is a default method that should suffice, but perhaps some
;; direct tricks could make this more efficient? Worth a look
;; LATER.
-#|
(defmethod xsetf ((destination matrix-like)
(source matrix-like)
&key map-function))
-|#
+ ;; (defmethod take) ; default should work for now.
+
+
- ;; (defmethod take) ; default should work for now.
- )
Please sign in to comment.
Something went wrong with that request. Please try again.