[cl-gsl-cvs] CVS update: cl-gsl/vector.lisp

cl-gsl-cvs at common-lisp.net cl-gsl-cvs at common-lisp.net
Fri Apr 22 02:40:55 UTC 2005


Update of /project/cl-gsl/cvsroot/cl-gsl
In directory common-lisp.net:/tmp/cvs-serv15002

Modified Files:
	vector.lisp 
Log Message:
Now part of gsl-array package. A few minor
modifications to some assertions.

Date: Fri Apr 22 04:40:55 2005
Author: edenny

Index: cl-gsl/vector.lisp
diff -u cl-gsl/vector.lisp:1.8 cl-gsl/vector.lisp:1.9
--- cl-gsl/vector.lisp:1.8	Mon Apr 18 02:55:09 2005
+++ cl-gsl/vector.lisp	Fri Apr 22 04:40:54 2005
@@ -17,7 +17,7 @@
 ;;;; along with this program; if not, write to the Free Software
 ;;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-(in-package #:cl-gsl-vector)
+(in-package #:cl-gsl-array)
 
 
 (defclass gsl-vector ()
@@ -277,9 +277,8 @@
          (setf (element-type o) nil))
 
 
-       (defmethod get-element ((o ,class-object) i)
-         (assert (typep i 'integer))
-         (assert (and (>= i 0) (< i (size o))))
+       (defmethod get-element ((o ,class-object) i &optional j)
+         (assert (and (typep i 'integer) (>= i 0) (< i (size o))))
          ,(if is-real
               `(,(kmrcl:concat-symbol "gsl-vector-" func-string "get")
                  (ptr o) i)
@@ -287,10 +286,9 @@
                  (,(kmrcl:concat-symbol "gsl-vector-" func-string "ptr")
                    (ptr o) i))))
 
-       (defmethod set-element ((o ,class-object) i x)
-         (assert (typep i 'integer))
+       (defmethod set-element ((o ,class-object) i &optional x dummy)
          (assert (typep x (element-type o)))
-         (assert (and (>= i 0) (< i (size o))))
+         (assert (and (typep i 'integer) (>= i 0) (< i (size o))))
          ,(if is-real
               `(,(kmrcl:concat-symbol "gsl-vector-" func-string "set")
                  (ptr o) i x)
@@ -324,8 +322,7 @@
          o)
 
 
-       (defmethod read-from-binary-file ((o ,class-object) file-name size)
-         (assert (and (> size 0) (<= size (size o))))
+       (defmethod read-from-binary-file ((o ,class-object) file-name)
          (let ((status))
            (uffi:with-cstring (c-file-name file-name)
              (setq status
@@ -333,8 +330,7 @@
                                           "fread") c-file-name (ptr o))))
            (values o status)))
 
-       (defmethod read-from-file ((o ,class-object) file-name size)
-         (assert (and (> size 0) (<= size (size o))))
+       (defmethod read-from-file ((o ,class-object) file-name)
          (let ((status))
            (uffi:with-cstring (c-file-name file-name)
              (setq status
@@ -506,9 +502,9 @@
          (t
           (error "initial-contents must be either a list or a vector."))))
       (from-file
-       (read-from-file v from-file size))
+       (read-from-file v from-file))
       (from-binary-file
-       (read-from-binary-file v from-binary-file size)))
+       (read-from-binary-file v from-binary-file)))
     v))
 
 
@@ -555,24 +551,4 @@
 
 ;; Function: gsl_vector_view gsl_vector_complex_real (gsl_vector_complex *v)
 ;; Function: gsl_vector_view gsl_vector_complex_imag (gsl_vector_complex *v)
-
-;; ----------------------------------------------------------------------
-;; Functions that I don't think need binding.
-;;
-
-;; Function: gsl_vector * gsl_vector_calloc (size_t n)
-
-;; Function: double * gsl_vector_ptr (gsl_vector * v, size_t i)
-;; Function: const double * gsl_vector_const_ptr (const gsl_vector * v, size_t i)
-
-;; Function: gsl_vector_const_view gsl_vector_const_subvector (const gsl_vector * v, size_t offset, size_t n)
-
-;; Function: gsl_vector_const_view gsl_vector_const_subvector_with_stride (const gsl_vector * v, size_t offset, size_t stride, size_t n)
-
-;; Function: gsl_vector_const_view gsl_vector_complex_const_real (const gsl_vector_complex *v)
-
-;; Function: gsl_vector_const_view gsl_vector_complex_const_imag (const gsl_vector_complex *v)
-
-;; Function: gsl_vector_view gsl_vector_view_array_with_stride (double * base, size_t stride, size_t n)
-;; Function: gsl_vector_const_view gsl_vector_const_view_array_with_stride (const double * base, size_t stride, size_t n)
 




More information about the Cl-gsl-cvs mailing list