diff --git a/data/both.lisp b/data/both.lisp index 3715334c8efdd8ac55982f620a7badcd384797bf..27b82a9ad3306792efba9abe962dbeb721851290 100644 --- a/data/both.lisp +++ b/data/both.lisp @@ -1,7 +1,6 @@ ;; Functions for both vectors and matrices. ;; Liam Healy 2008-04-26 20:48:44EDT both.lisp -;; Time-stamp: <2009-05-25 15:19:49EDT both.lisp> -;; $Id$ +;; Time-stamp: <2009-11-18 10:46:49EST both.lisp> (in-package :gsl) @@ -141,13 +140,26 @@ ("gsl_" :category :type "_add_constant") (((mpointer a) :pointer) (x :double)) :definition :methods - :element-types #.(if (have-at-least-gsl-version '(1 12)) t :no-complex) + :element-types :no-complex :inputs (a) :outputs (a) :return (a) :documentation ; FDL "Add the scalar double-float x to all the elements of array a.") +#+fsbv +(defmfun elt+ ((a both) (x complex)) + ("gsl_" :category :type "_add_constant") + (((mpointer a) :pointer) (x :element-c-type)) + :definition :methods + :element-types :complex + :inputs (a) + :outputs (a) + :return (a) + :gsl-version (1 12) + :documentation ; FDL + "Add the scalar complex x to all the elements of array a.") + (defmethod elt+ ((x float) (a marray)) (elt+ a x)) @@ -208,20 +220,33 @@ :outputs (a) :return (a)) -(defmethod elt/ ((a marray) (x float)) +(defmethod elt/ ((a marray) (x number)) (elt* a (/ x))) (defmfun elt* ((a both) (x float)) ("gsl_" :category :type "_scale") (((mpointer a) :pointer) (x :double)) :definition :methods - :element-types #.(if (have-at-least-gsl-version '(1 12)) t :no-complex) + :element-types :no-complex :inputs (a) :outputs (a) :return (a) :documentation ; FDL "Multiply the elements of a by the scalar double-float factor x.") +#+fsbv +(defmfun elt* ((a both) (x complex)) + ("gsl_" :category :type "_scale") + (((mpointer a) :pointer) (x :element-c-type)) + :definition :methods + :element-types :complex + :inputs (a) + :outputs (a) + :return (a) + :gsl-version (1 12) + :documentation ; FDL + "Multiply the elements of a by the scalar complex factor x.") + (defmethod elt* ((x float) (a marray)) (elt* a x)) diff --git a/init/body-expand.lisp b/init/body-expand.lisp index 19fea05e330518428cfb2e6eac6fb58a1a30294e..11d70cad65cd043153cad993022595c113678f31 100644 --- a/init/body-expand.lisp +++ b/init/body-expand.lisp @@ -1,7 +1,6 @@ ;; Expand the body of a defmfun ;; Liam Healy 2009-04-13 22:07:13EDT body-expand.lisp -;; Time-stamp: <2009-11-14 10:19:46EST body-expand.lisp> -;; $Id: $ +;; Time-stamp: <2009-11-18 09:56:18EST body-expand.lisp> (in-package :gsl) @@ -123,7 +122,7 @@ (t (st-type arg))) (st-symbol arg))) (mapcar 'st-pointer-generic-pointer c-arguments)) - (list(st-type creturn-st)))))) + (list (st-type creturn-st)))))) ,@(case c-return (:void `((declare (ignore ,(st-symbol creturn-st))))) (:error-code ; fill in arguments diff --git a/init/defmfun.lisp b/init/defmfun.lisp index d6f76dc572cf9a990254ebe9acde184dcde7ed60..1bd40115f02187124f1b655de0aa86d4b380d636 100644 --- a/init/defmfun.lisp +++ b/init/defmfun.lisp @@ -1,7 +1,6 @@ ;; Macro for defining GSL functions. ;; Liam Healy 2008-04-16 20:49:50EDT defmfun.lisp -;; Time-stamp: <2009-05-24 16:54:33EDT defmfun.lisp> -;; $Id$ +;; Time-stamp: <2009-11-18 09:14:07EST defmfun.lisp> (in-package :gsl) @@ -10,7 +9,7 @@ ;;;;**************************************************************************** ;;; Demfun is the main macro for defining functions (ordinary -;;; functions, generic functions, and methods) tthat call GSL +;;; functions, generic functions, and methods) that call GSL ;;; functions. It takes care of mapping the data from CL to C and ;;; then back out from C to CL. Where the GSL function returns a ;;; condition code, it will insert a check that turns that result into