1. 01 Jan, 2017 1 commit
    • Liam Healy's avatar
      New argument to defmobject · dd2e7673
      Liam Healy authored
      Add key argument :initialize-when-making to defmobject, which controls
      whether initialization (by calling reinitialize-instance or some other
      function) happens when the make-* function defined by this macro is
      called. Choices are
        T=yes always
        NIL=no
        :default-T=optional (default T)
        :default-NIL=optional (default NIL)
      and the default is T to be consistent with previous behavior.
      
      This is used in the newly defined defmobject 'permutation.
      dd2e7673
  2. 12 Jan, 2011 1 commit
  3. 10 Jan, 2011 1 commit
  4. 14 Nov, 2010 1 commit
    • Liam Healy's avatar
      Definition of grid:gref* for histogram · de942c32
      Liam Healy authored
      Define method grid:gref* for histograms; it was a definition of
      grid:gref, but with the compiler macro that turns that into
      grid:gref*, we need it to be a definition of grid:gref* instead.
      Removed the definition of +foreign-array-pointer+ and
      +foreign-array-type+ to the grid package.
      de942c32
  5. 16 Jul, 2010 1 commit
    • Liam Healy's avatar
      Copy with #'grid:copy methods · bdbb354b
      Liam Healy authored
      Copy with #'grid:copy methods and eliminate copy-to-destination and
      copy-making-destination.  For non-grid objects, the presence or
      absence of destination selects different foreign functions.
      bdbb354b
  6. 11 Jul, 2010 1 commit
  7. 07 Jul, 2010 1 commit
  8. 01 Jul, 2010 1 commit
  9. 30 Jun, 2010 1 commit
  10. 27 Jun, 2010 1 commit
  11. 27 Dec, 2009 1 commit
  12. 21 Dec, 2009 2 commits
    • Liam Healy's avatar
      Move copy, copy-making-destination to grid · 3680b307
      Liam Healy authored
      Moved the definition of the generic function copy-making-destination
      to copy objects while making a destination object, and the wrapper
      function #'copy for that and copy-to-destination to grid/ and c-array:
      package.
      3680b307
    • Liam Healy's avatar
      Move copy-to-destination to grid · 06f99392
      Liam Healy authored
      The generic function definition for copy-to-destination is now in
      grid/ and the c-array package.  This will make it accessible to
      non-GSLL foreign library interfaces, but the new location is a bit
      deceptive because a new method needn't be a subclass of foreign-array.
      06f99392
  13. 07 Nov, 2009 1 commit
  14. 26 Aug, 2009 1 commit
    • Liam Healy's avatar
      List argument to defmobject :initialize-suffix · 8555fb6a
      Liam Healy authored
      A list argument to defmobject :initialize-suffix now means what a list
      argument to defmfun to defmfun c-arguments does: there are two foreign
      functions corresponding to the Lisp function; in this case, to
      reinitialize-instance.  The old meaning of having the second element
      specify the c-return reinitialize-instance has been eliminated;
      instead, this information is conveyed in a new key argument
      :ri-c-return.
      8555fb6a
  15. 24 Aug, 2009 1 commit
    • Liam Healy's avatar
      Multiple foreign functions in the reinitialize-instance for mobjects · 9990ee06
      Liam Healy authored
      It is now possible to specify two foreign functions for the
      reinitialize-instance for defmobject.  The switch between the function
      depends on the presence or absence of optional/key arguments.  This is
      used in the definition of one-dimensional-minimizer to switch between
      gsl_min_fminimizer_set and gsl_min_fminimizer_set_with_values
      depending on the non-NIL value of f-minimum.  The set-with-values case
      has not yet been tested.
      9990ee06
  16. 25 May, 2009 1 commit
    • Liam Healy's avatar
      Generic function #'size · 453f3364
      Liam Healy authored
      A new generic function #'size replaces the old ordinary functions
      #'size (for Chebyshev) and #'combination-size, #'permutation-size,
      #'rng-size, and #'mfminimizer-size.
      453f3364
  17. 05 Apr, 2009 1 commit
    • Liam Healy's avatar
      Internal variable rename 'cbinfo · 3987beef
      Liam Healy authored
      Internally call the :callbacks argument to defmobject or defmfun
      'cbinfo, to better distinguish it in the source code.  In numerical
      integration example functions, apply #'realpart, because
      implementations are permitted to return complex numbers from #'expt
      when the second argument is a float.
      3987beef
  18. 04 Apr, 2009 1 commit
    • Liam Healy's avatar
      Eliminated dependency on cl-utilities; error for obsolete defmpar · 45ca8e88
      Liam Healy authored
      The defmobject argument 'class-slots-instance is no longer used, so
      #'callback-arg-p and the only use of with-unique-names can be
      eliminated, and thus the dependency on cl-utilities.
      
      Constant GSL functions in the library (such as minimizers) which
      were introduced in a GSL version newer than loaded now expand as
      symbol macros which signal the 'obsolete-gsl-version error.
      45ca8e88
  19. 02 Apr, 2009 1 commit
    • Liam Healy's avatar
      Replace mapcan with mappend · 7f485182
      Liam Healy authored
      In cases where the lists being nconced exist external to the call,
      replace mapcan with user-defined mappend to prevent destructive
      modification.
      7f485182
  20. 30 Mar, 2009 1 commit
    • Liam Healy's avatar
      ODE solver functional with funcallables · 741fd237
      Liam Healy authored
      Changed the defmobject definitions to handle a 'callback-included-cl
      object.  Changed the ODE solver definitions to take separate arguments
      for the function and Jacobian, as well as scalarsp.  Not completely
      finished, but tests
      (integrate-vanderpol 1.0d0 1.d-4 +step-rk2+ nil)
      (integrate-vanderpol 1.0d0 1.d-4 +step-rkf45+ nil)
      work correctly.
      741fd237
  21. 29 Mar, 2009 2 commits
    • Liam Healy's avatar
      Most mobject-based callbacks ported to funcallables · 1349c73a
      Liam Healy authored
      All mobject-based callbacks now use the funcallable mechanism, except
      ODE, which has been ported but fails to compile.  All other tests
      pass.  In the event of some or all arguments are scalars and not
      arrays, #'array-element-refs will return just the argument symbol.  To
      avoid double quoting the function name when calling the object maker,
      let bind 'function-designator in #'make-funcallable-form which does
      the quoting.
      1349c73a
    • Liam Healy's avatar
      Added slot 'funcallables to 'callback-included · ea9a2156
      Liam Healy authored
      The callback-included objects now have a slot 'funcallables which is
      set by a function #'make-funcallables-for-object which is used by
      make-reinitialize-instance.  This required swapping the order of
      :callback-object and :before in body-expand, which shouldn't affect
      anything else.  New name #'make-funcallable-form renamed from
      #'make-funcallable to clarfiy distinction with
      #'make-funcallables-for-object.  Eliminated select-dynamic-values.
      ea9a2156
  22. 23 Mar, 2009 1 commit
    • Liam Healy's avatar
      Dynamic callbacks for nonlinear-least-squares · 26e3b36e
      Liam Healy authored
      Dynamic callbacks now operational for nonlinear-least-squares, test
      passes.  Callback struct slot name(s) and value(s) now properly set in
      pure function calls, even though this only affects Monte Carlo, which
      doesn't care whether the dimension is set or not.  The first optional
      argument to the mobject maker generated by #'mobject-maker can now
      have a default value, and the settingp will be added correctly.
      26e3b36e
  23. 22 Mar, 2009 2 commits
    • Liam Healy's avatar
      Third element of :callbacks is list of dimension names · cd435bbf
      Liam Healy authored
      Previously, the dimension-names always defaulted.  Changed all
      relevant definitions so that third element of :callbacks is a list of
      the dimension names, which must be explicitly specified.  All the
      expected tests pass on recompilation.
      cd435bbf
    • Liam Healy's avatar
      Changed arguments in defmobject · ffdf633a
      Liam Healy authored
      Variable 'initargs is no longer computed in defmobject and passed to
      mobject-maker along with cl-initialize-args from which it is computed,
      it is computed in mobject-maker.  Then 'scalarsp is added only once at
      the top of this function.  Eliminated :ci-class-slots argument.
      ffdf633a
  24. 21 Mar, 2009 2 commits
    • Liam Healy's avatar
      Dynamic callbacks for minimization-multi · 214d5642
      Liam Healy authored
      Argument 'scalarsp added at end of optional arguments to mobject
      maker; it is then passed to reinitialize-instance.  Even though it is
      not specified as an argument there, it is accepted to set the slot of
      that name.  Ported minimization-multi to dynamic callbacks; examples
      all work.  Linear least squares re-enabled in gsll.asd; no changes.
      214d5642
    • Liam Healy's avatar
      Use (parse-callback-static callbacks 'foreign-argument) · 43b04588
      Liam Healy authored
      Use (parse-callback-static callbacks 'foreign-argument) instead of the
      fixed symbol +callback-argument-name+, which has been removed.
      New definition for tests for numerical-differentiation and
      numerical-integration using CL function names directly.  Callback
      tests ported so far pass.
      NUMERICAL-INTEGRATION: 3 assertions passed, 0 failed.
      NUMERICAL-DIFFERENTIATION: 18 assertions passed, 0 failed.
      MONTE-CARLO: 3 assertions passed, 0 failed.
      ROOTS-ONE: 6 assertions passed, 0 failed.
      MINIMIZATION-ONE: 2 assertions passed, 0 failed.
      ROOTS-MULTI: 8 assertions passed, 0 failed.
      43b04588
  25. 20 Mar, 2009 2 commits
    • Liam Healy's avatar
      Make marrays make from pointer with copy · de18c122
      Liam Healy authored
      Make marrays from pointer with #'copy instead of make-marray;
      :from-pointer argument removed from #'make-marray.  Define a macro
      foreign-pointer-method that for most implementations just returns the
      form.  For CLISP however, it checks that the pointer is of type
      +foreign-pointer-type+, because in CLISP the foreign pointer class is
      T.  Export marray subclass names.
      de18c122
    • Liam Healy's avatar
      Extend #'copy to copy to or from mpointers · efa2315f
      Liam Healy authored
      Both copy-to-array and copy-making-destination have been extended so
      that an mpointer can occur as the first or second argument.  If the
      first argument, the second argument should be a symbol representing a
      subclass of marray.  If the second argument is not present
      (copy-making-destination), 'vector-double-float is assumed.  If the
      mpointer is the second argument, the marray contents are copied into
      its contents.  These methods are useful for callbacks and GSL
      functions that send raw mpointers.  For example, a callback that uses
      foreign arrays directly can simply copy from and to them.  This has
      been applied in the solve-minimize-fit functions that return a raw
      mpointer, replacing the explicit call to make-marray.  The first
      argument to #'marray can now be either the class name or element-type.
      efa2315f
  26. 19 Mar, 2009 1 commit
    • Liam Healy's avatar
      Add 'scalarsp, eliminate 'callback-dynamic from callback-included · 88076763
      Liam Healy authored
      Add the slot 'scalarsp and eliminate the slot 'callback-dynamic from
      the class callback-included, and modify the defmobject uses
      accordingly.  All dynamic quantities (function, scalarsp, dimensions)
      will be set from slot values at run time.  This works for the objects
      ported so far:
       (lisp-unit:run-tests chebyshev)
       CHEBYSHEV: 1 assertions passed, 0 failed.
       (lisp-unit:run-tests roots-one)
       ROOTS-ONE: 6 assertions passed, 0 failed.
       (lisp-unit:run-tests minimization-one)
       MINIMIZATION-ONE: 2 assertions passed, 0 failed.
      Started working on roots-multi; it now compiles but does not run.
      88076763
  27. 15 Mar, 2009 2 commits
    • Liam Healy's avatar
      Better support for array returns (prototype roots-one), ordering of load · 94bcffd5
      Liam Healy authored
      In roots-one.lisp, added arguments for dynamic callbacks.  This is not
      complete; 
       (roots-one-example-derivative +newton-fdfsolver+ nil)
      causes both SBCL and CCL to crash to low-level debuggers.
      These changes included using a new function list-to-arrays in
      call-maybe-scalar so that multiple arrays can be set. 
      New file callback-compile-defs has definitions that are needed at
      compile time of later files.  Added a call record-callbacks-for-class
      in defmobject, in addition to the expansion in the form, because the
      hash table *callbacks-for-classes* needs to be updated with the class
      being defined for the macro make-cbstruct-object to work.  Added
      comments above defmobject to explain some of the arguments.
      94bcffd5
    • Liam Healy's avatar
      Dynamic callback defined in mobject, works for chebyshev · d3fd192d
      Liam Healy authored
      The class 'callback-included has been simplified by replacing several
      obsolete slots with 'callbacks and 'callback-dynamic.  The :callbacks
      static information is saved to a hash table so that it may be
      retrieved when the defmfun is expanded.  The function
      make-cbstruct-object to make the callback structure
      as an &aux variable in reinitialize-instance :after form expanded in
      defmobject is now a form expansion executed at macroexpand time.
      The argument :callback-object has been added to defmfun; this will
      result in the binding of the dynfn dynamic variable on expansion.
      
      The callback arguments for chebyshev definitions have been updated and
      the example works.
      d3fd192d
  28. 10 Mar, 2009 1 commit
  29. 24 Feb, 2009 1 commit
  30. 19 Feb, 2009 1 commit
    • Liam Healy's avatar
      GSL features added in version 1.12; fix spelling · cefb7c3f
      Liam Healy authored
      Added faster simplex mininimser using the symbol
      +simplex-nelder-mead+; the old one is now called
      +simplex-nelder-mead-on2+.  Added new functions #'order, #'size,
      #'coefficients for Chebyshev; #'order is a generic function.
      Added methods for vectors with complex elements for elt+, elt-, elt*,
      elt/.  Fix spelling of "paraboloid".
      cefb7c3f
  31. 16 Feb, 2009 2 commits
    • Liam Healy's avatar
      Suppress spurious style-warnings from SBCL in generic function &key · 05428839
      Liam Healy authored
      SBCL gets confused about what &key arguments are acceptable for
      generic functions, so &allow-other-keys is added for SBCL only in the
      defgeneric of #'evaluate.
      05428839
    • Liam Healy's avatar
      Monte Carlo uses direct function callbacks · bcf61476
      Liam Healy authored
      Direct function callbacks may now be used with GSL structs other than
      'gsl-function, and will set the 'dimension slot as well by looking at
      the arglist of the function sent.  This uses an #'arglist borrowed
      from CLOCC:port.  Rewrite make-callbacks based on a hash table rather
      than a generic function.  All the usualy tests pass.
      SBCL 64:
      TOTAL: 1259 assertions passed, 5 failed, 0 execution errors.
      CCL 64:
      TOTAL: 1260 assertions passed, 4 failed, 0 execution errors.
      bcf61476
  32. 15 Feb, 2009 2 commits
    • Liam Healy's avatar
      Define functions and macro to help direct use of callbacks in defmfun · 3d57ef40
      Liam Healy authored
      As a way of making it easier to use something other than a
      gsl-function and with additional slots set, and to make more clear
      where specific variable names are treated specially, define and use:
        callback-arg-p
        callback-replace-arg
        callback-remove-arg
        callback-set-slots
      Also split off #'set-cbstruct which #'make-cbstruct and
      callback-set-slots both use.
      3d57ef40
    • Liam Healy's avatar
      Finalizer for callback structure in CL slot · ea176adc
      Liam Healy authored
      Define a finalizer for callback structure in CL slot, so that when the
      object is garbage collected, the foreign space for the callback is
      also removed.  Deleted duplicate definition of make-cbstruct-object.
      ea176adc