Commit 7d16dea3 authored by liam's avatar liam
Browse files

Begin the generalization of data source, so that arrays may be

imported from CL set up with data.


git-svn-id: svn+ssh://pop/opt/space/mathematics/gsl/trunk@3029 a3d8a0fb-c1db-0310-ace7-a616afeb9e30
parent 71e9d7cb
......@@ -3,7 +3,7 @@
; description: Combinations
; date: Sun Mar 26 2006 - 11:51
; author: Liam M. Healy
; modified: Fri Apr 7 2006 - 18:04
; modified: Tue Apr 11 2006 - 13:15
;********************************************************
;;; $Id: $
......@@ -20,7 +20,7 @@
(data :pointer))
(defclass gsl-combination (gsl-data)
()
((base-type :initform :size :reader base-type :allocation :class))
(:documentation "GSL combination."))
;;; Allocation, freeing, reading and writing
......
......@@ -3,7 +3,7 @@
; description: Using GSL storage.
; date: Sun Mar 26 2006 - 16:32
; author: Liam M. Healy
; modified: Mon Apr 10 2006 - 23:10
; modified: Tue Apr 11 2006 - 18:06
;********************************************************
;;; $Id: $
......@@ -64,7 +64,8 @@
',(cl-name 'read 'formatted)))))))
(defclass gsl-data ()
((pointer :initarg :pointer :reader pointer)))
((pointer :initarg :pointer :reader pointer)
(storage-size :initarg :storage-size :reader storage-size )))
;;; Accessing elements
(export 'gsl-aref)
......@@ -129,6 +130,24 @@
,@body)
(,(cl-name 'free) ,ptr))))))
#+new
(defun make-data (type size &optional init validate)
"Make the GSL data, i.e. vector, matrix, combination, etc."
(make-instance
(intern (format nil "GSL-~a" type))
:pointer pointer)
(case init
((:fast :identity) (cl-name 'alloc))
((t) nil)
(t `((data-import ,symbol ,init))))
(case init
(:identity `((set-identity ,symbol)))))
#+new
(defun free-data (data)
)
;;;(with-data (p permutation 5 #(2 3 4 0) t) foo)
#|
......
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