From: Gary K. <gw...@me...> - 2009-02-01 15:55:59
|
Just to be extra sure, you might want to try compute-applicable- methods... On Feb 1, 2009, at 10:41 AM, Liam Healy wrote: > On Sun, Feb 1, 2009 at 4:40 AM, Tobias C. Rittweiler > <tc...@fr...> wrote: >> Liam Healy <ln...@he...> writes: >> >>> I am seeing a style warning when I call a method using a particular >>> key argument, :divided-difference. >>> I don't understand why. It doesn't happen in CCL. >>> >>> (defgeneric evaluate (object point &key) >>> (:documentation "Evaluate the GSL object.")) >>> >>> ;; This is the macro expansion of my method definition: >>> (DEFMETHOD EVALUATE >>> ((COEFFICIENTS VECTOR-DOUBLE-FLOAT) (X FLOAT) &KEY >>> DIVIDED-DIFFERENCE) >> >> What is VECTOR-DOUBLE-FLOAT? > > It is a class I have defined. > >> >>> ;;; Here is a sample call that triggers the warnings >>> (let ((xa #m(0.0d0 1.0d0 2.0d0 3.0d0)) >>> (ya #m(2.5d0 7.2d0 32.7d0 91.0d0)) >>> (dd (make-marray 'double-float :dimensions 4))) >>> (divided-difference dd xa ya) >>> (list >>> (evaluate xa 0.0d0 :divided-difference dd) >>> (evaluate xa 1.0d0 :divided-difference dd) >>> (evaluate xa 2.0d0 :divided-difference dd) >>> (evaluate xa 3.0d0 :divided-difference dd))) >>> ; in: LAMBDA NIL >>> ; (GSLL:EVALUATE GSLL::XA 0.0d0 :DIVIDED-DIFFERENCE GSLL::DD) >> >> Is XA really of class VECTOR-DOUBLE-FLOAT? Are you sure that the >> above >> method is invoked by these forms, and not another method (without the >> :DIVIDED-DIFFERENCE keyword---explaining the style-warnings)? > > Yes. > #m(0.0d0 1.0d0 2.0d0 3.0d0) > #<VECTOR-DOUBLE-FLOAT #(0.0d0 1.0d0 2.0d0 3.0d0)> > (class-of *) > #<STANDARD-CLASS VECTOR-DOUBLE-FLOAT> > > Here are all the methods of #'evaluate, as shown by slime-inspect > > Methods: > (VECTOR-DOUBLE-FLOAT FLOAT) [remove method] > (BASIS-SPLINE T) [remove method] > (CHEBYSHEV T) [remove method] > (SPLINE T) [remove method] > (INTERPOLATION T) [remove method] > > all the classes shown as the first argument are subclasses of mobject, > but they are mutually exclusive (so a vector-double-float is not also > any of the other classes named). > > Liam > >> >> -T. >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Sbcl-devel mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-devel -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter |