1. 11 Jul, 2010 1 commit
  2. 30 Jun, 2010 1 commit
  3. 27 Jun, 2010 1 commit
  4. 27 Dec, 2009 1 commit
  5. 21 Dec, 2009 1 commit
    • Liam Healy's avatar
      Move symbol-type and number-conversion to grid · ce261d71
      Liam Healy authored
      Move number-conversion.lisp from init/ to grid/ and symbol-type
      portion of init/interface.lisp to grid/symbol-type.lisp.
      All tests pass
      TOTAL: 1627 assertions passed, 6 failed, 0 execution errors.
      ce261d71
  6. 08 May, 2009 1 commit
  7. 05 Apr, 2009 2 commits
    • Liam Healy's avatar
      Standardized names of GSL function structs · eb1420b4
      Liam Healy authored
      All defcstruct definitions for functions are in the new file
      init/callback-struct.lisp.  They all have standard name format
      beginning with "fnstruct" and have been consolidated where there were
      redundant definitions.
      eb1420b4
    • 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
  8. 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
  9. 03 Apr, 2009 1 commit
    • Liam Healy's avatar
      Number symbols sequentially; intern specials for defmfun · 86d01196
      Liam Healy authored
      Created file init/utility.lisp, which now includes
      make-symbol-cardinal and make-symbol-cardinals.  These functions in
      turn will now take a list for name, and join the symbols together with
      "-", and will optionally intern in a package.  In #'callback-args in
      callback.lisp, the args are now numbered sequentionally (still
      uninterned, but no longer gensymmed).  In #'expand-defmfun-wrap in
      defmfun.lisp, the symbols for specials "dynfn" and "cbfn" that are
      made are now interned, numbered sequentially, and named after the
      function in which they occur.  This doesn't affect the functionality
      of the functions, it is just for readability of the macroexpansion.
      Expected tests pass.
      86d01196
  10. 01 Apr, 2009 2 commits
    • Liam Healy's avatar
      Clean up · ff9d0f7e
      Liam Healy authored
      Remove obsolete definitions for make-callback and move print-object to
      callback-included.lisp.
      ff9d0f7e
    • Liam Healy's avatar
      Pure defmfun callbacks dynamically specified fully functional · 42e2d608
      Liam Healy authored
      Redefine the form of :callback-dynamic to be
      (dimensions (function scalarsp) ...)
      and usage in numerical-differentiation, numerical-integration, and
      monte-carlo.  Parse this variable in callbacks.lisp with #'cbd-dimensions
      and #'cbd-functions.  Fix error in wfo-declare which had gsl-function
      hardwired.  If manually defined (defconstant +success+ 0),
      all tests that pass in master also pass here:
      SBCL
      TOTAL: 1451 assertions passed, 5 failed, 0 execution errors.
      CCL
      TOTAL: 1454 assertions passed, 2 failed, 0 execution errors.
      42e2d608
  11. 31 Mar, 2009 1 commit
    • Liam Healy's avatar
      Pure-defmfun callbacks with funcallables · 74c8475e
      Liam Healy authored
      Both numerical-differentiation and numerical-integration have new
      :callbacks and the expansion calls new function
      #'make-compiled-funcallable which makes the funcallable at
      function-call time.  Spot tests of both work.  If a function passed to
      set-slot-function is nil, it will set the slot to null-pointer.
      74c8475e
  12. 29 Mar, 2009 1 commit
    • Liam Healy's avatar
      Incorporation of make-funcallable into callback call chain · 09ce32be
      Liam Healy authored
      The callback call chain (for mobjects at the moment) now calls
      make-funcallable when the mobject is made.  The :callbacks format is
      slightly different in that :slug is required.  The derivative-free
      minimization-multi example works, but requires a double quote on the
      function name, which should be fixed.  The runtime-called function
      #'call-maybe-scalar and its supporting definitions have been removed,
      in anticipation of all callbacks using make-funcallable.
      09ce32be
  13. 26 Mar, 2009 1 commit
    • Liam Healy's avatar
      Start port new spec of callback arguments, make-funcallable, ODE · c125397a
      Liam Healy authored
      New specification of callback arguments
      parse-callback-argspec takes 
        io, element-type, array-type, dimensions
      Not at all implemented anywhere in the code.
      Made file funcallable.lisp out of the old defmcallback, designed to
      create a lambda for compilation that will be funcalled by the (new)
      defmcallback body.  This still uses the old specification for function
      arguments.  Started porting ODE callbacks, but this has been suspended
      while the first two changes are being completed.  None of this works
      in any way.
      c125397a
  14. 23 Mar, 2009 2 commits
    • Liam Healy's avatar
      New errno code interpretation and gsl-condition definitions · d3d82a26
      Liam Healy authored
      Make a defconstant on earmuffed symbols of cffi:defcenum gsl-errorno,
      e.g. +continue+, +failure+, +success+, etc., and use those in
      define-gsl-condition forms in condition.lisp.  Remove the symbol macro
      definition of 'success.  Define a condition 'unspecified-errno in case
      an error code is processed that isn't in the list.  Redefine
      #'success-failure to true if either +success+ or +continue+, from
      non-negative.  
      
      In roots-multi, fixed error in multiroot-test-residual return for, and
      changed roots-multi-example-no-derivative to insure the loop is
      executed at least once so that fnval and argval are always bound
      before exiting.
      d3d82a26
    • 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
  15. 22 Mar, 2009 1 commit
    • 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
  16. 21 Mar, 2009 1 commit
    • 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
  17. 17 Mar, 2009 1 commit
    • Liam Healy's avatar
      Map marrayp, roots-one and minimization-one work · 2a96cfe3
      Liam Healy authored
      The array-type as given in the callback-argspec is either :cvector or
      :marray.  The functions list-to-arrays and list-to-array expect
      argument 'marrayps or 'marrayp which are T or NIL.  That means I need
      to map the 'marrays argument in #'call-maybe-scalar which is :marray
      or :cvector to T/NIL.  Wrote function #'marrayp to do this.
      Example in one-dimensional-root-solver-fdf
      (roots-one-example-derivative +newton-fdfsolver+ nil)
      now works; in fact all roots-one tests pass:
      (lisp-unit:run-tests roots-one)
      ROOTS-ONE: 6 assertions passed, 0 failed.
      Ported minimization-one, tests pass:
      (lisp-unit:run-tests minimization-one)
      MINIMIZATION-ONE: 2 assertions passed, 0 failed.
      2a96cfe3
  18. 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
  19. 14 Mar, 2009 2 commits
    • Liam Healy's avatar
      New file callback-included.lisp · 4e928c8c
      Liam Healy authored
      Separate out the file callback-included.lisp from callback.lisp to
      define callback-related subclasses of mobject and macros to make
      instances.
      4e928c8c
    • Liam Healy's avatar
      New functions to parse :callbacks argument · b07e9299
      Liam Healy authored
      New functions 
        parse-callback-static
        parse-callback-fnspec
        parse-callback-argspec
      work on the :callbacks argument.  The first one parses the whole
      argument.  The second one parses a particular function specification
      from :callbacks.  The third one parses a particular argument of a
      particular function.  When given 'dimensions, this function supplies
      all the dimensions, and #'defmcallback expands to make a list of the
      arguments.  Then call-maybe-scalar passes these on to array-to-list,
      which currently only handles a vector.  These are now used in
      #'make-defmcallbacks and #'defmcallbacks.  Both
      monte-carlo-integrate-plain and integration-QNG compile and run
      correctly.  I have eliminated the old defmcallback and supporting
      definitions to clean up the file.
      b07e9299
  20. 10 Mar, 2009 1 commit
  21. 08 Mar, 2009 1 commit
    • Liam Healy's avatar
      Dynamic dimensions for callbacks · 00d7b1db
      Liam Healy authored
      Dimensions that have been placed into the dynamic-variable are now
      read and used for array input, as for example in Monte Carlo.
      Functions that use callbacks with scalar input and output (as for
      example in numerical-integration and numerical-differentiation) are
      now expanded directly with a funcall instead of call-maybe-scalar.
      Modifications and new definitions to set arrays partly written and
      untested, await changes to defmobject where callbacks setting array
      values exist.
      00d7b1db
  22. 06 Mar, 2009 1 commit
  23. 02 Mar, 2009 2 commits
    • Liam Healy's avatar
      Separate :callback-dynamic from :callbacks arguments · ce520713
      Liam Healy authored
      The :callback argument to defmfun has now been split into two pieces,
      a set of values that will be specified at run time, which is in
      :callback-dynamic, and the values needed to build the callback and
      the callback structure, which remains in :callback.  The contents are
      explained in callback.lisp.  For mobject callbacks, the :callback part
      will be in the defmobject, and the :callback-dynamic will be in the
      defmfuns that use the mobject.  Currently, the dimensions template in
      :callback is not read, just the first dimension in :callback-dynamic
      is used.  This needs to be fixed.  The numerical-integration,
      numerical-differentiation, and monte-carlo examples work.
      ce520713
    • Liam Healy's avatar
      Dynamic callback functions in defmfun for array arguments · 69639247
      Liam Healy authored
      Extended the dynamic binding of callback functions to include a flag
      on whether to use scalars, and the dimension of the arguments, so that
      callback functions that have more than one scalar input and are
      defined in a defmfun will work.  This includes exactly Monte Carlo
      functions.  Scalar argument functions in numerical differentiation and
      numerical integration still work.
      69639247
  24. 01 Mar, 2009 1 commit
    • Liam Healy's avatar
      In defmfun, :callbacks argument extended; formalize reading · 3b409c13
      Liam Healy authored
      The :callbacks argument to defmfun is now has at least four elements,
      the first two specifying the callback argument name and the structure
      name, and the remaining pairs specify the slot name and name of the
      variable bound to the function.  Functions defined for extracting
      these pieces: callback-carg, callback-structure-type,
      callback-slots-fns.  Even though in defmfun it is not necessary to
      define more than one callback function, it is possibile to define
      more.  This has been tested on integration-QNG only.
      3b409c13
  25. 28 Feb, 2009 1 commit
    • Liam Healy's avatar
      Scalar functions passed as callback arguments · 01164ead
      Liam Healy authored
      A dynamic (special) variable whose name is gensymmed is used to bind
      the function passed by the user as the argument to the GSLL function.
      The defmfun that defines this function also sets the callback
      structure to another gensymmed name, and it calls a function that
      funcalls the dynamic variable.  This has been implemented for
      integration-QNG and works.
      01164ead
  26. 26 Feb, 2009 1 commit
  27. 17 Feb, 2009 1 commit
    • Liam Healy's avatar
      GSL features added in version 1.10 · 94413b43
      Liam Healy authored
      Functions added to GSL with version 1.10, and related changes: 
      - Cholesky routines for complex matrices; Cholesky functions _solve and
      _svx (solution separate and in-place) now combined into a single
      generic function with an optional argument #'cholesky-solve.
      Unfortunately a default marray maker can't be included in the optional
      argument.
       - Correlation added, and covariance and correlation tests expanded to
      all supported matrix element types.
       - Added #'exponential-integral-En for nth-order exponential integral.
       - Also rewrote #'callback-set-slots and #'body-expand to eliminate
      gratuitous (progn nil ...) in some defmfun expansions.
      Test results:
      SBCL 64: TOTAL: 1379 assertions passed, 5 failed, 0 execution errors.
      CCL 64: TOTAL: 1380 assertions passed, 4 failed, 0 execution errors.
      94413b43
  28. 16 Feb, 2009 1 commit
    • 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
  29. 15 Feb, 2009 4 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
      Make 'single-function "class" for (def-)make-callbacks · e236d8d7
      Liam Healy authored
      Many callback users need just a single function taking and returning
      scalars.  These are all defined the same way.  So I have defined in
      callbacks.lisp a def-make-callbacks for 'single-function.  This works
      for chebyshev, minimization-one, and roots-one, and it should be
      applicable to callbacks sent directly to functions without being
      stored in mobjects.
      e236d8d7
    • Liam Healy's avatar
      Chebyshev ported to callbacks-included and example/test fixed · 84b5a165
      Liam Healy authored
      Chebyshev object now built on callbacks-included.  The example/test
      was generating an error because the calls in integral-chebyshev and
      derivative-chebyshev did not have a needed #'mpointer call.  This has
      been fixed and the test results match the previous result given in
      8d9ce4e8.
      84b5a165
    • Liam Healy's avatar
      ODE evolution ported to callbacks-included · b6561c8e
      Liam Healy authored
      Mobject 'ode-evolution is now made as a subclass of 'callbacks-included-cl, a
      new class that is a subclass of 'callbacks-included, but which stores the
      cbstruct pointer in a CL slot rather than in a foreign struct.  This example is
      correct,
      (integrate-vanderpol 1.0d0 1.d-4 *step-rk4* nil)
      40
      1.0d0
      -1.4568569264026898d0
      -11.547449151779395d0
      b6561c8e
  30. 14 Feb, 2009 1 commit
    • Liam Healy's avatar
      Nonlinear least squares ported to callbacks-included; 'dimension-names · 59d0892f
      Liam Healy authored
      Nonlinear least squares now works using callbacks-included.  This
      necessitated naming the components of dimensions individually 
      (number-of-observations number-of-parameters).  This is done with
      added slot 'dimension-names to the callbacks-included class and an
      argument of the same name to #'def-ci-subclass which defaults to
      '(dimensions).  Because of the default, the other defmobject usage
      need not be changed.
      59d0892f
  31. 09 Feb, 2009 1 commit
    • Liam Healy's avatar
      New macro #'def-make-callbacks · 6b35d063
      Liam Healy authored
      New macro #'def-make-callbacks will expand to the appropriate
      defmethod for make-callback-fn, so that the defmcallbacks are defined
      appropriately.
      6b35d063