1. 27 Jun, 2010 1 commit
  2. 20 Apr, 2010 1 commit
  3. 27 Dec, 2009 1 commit
  4. 26 Dec, 2009 1 commit
    • Liam Healy's avatar
      Use symbols exported from c-array · a13502c2
      Liam Healy authored
      Some symbols that were formerly in the GSLL package and now are in
      c-array need to imported from that package.  This only affects
      non-native implementation and so was discovered in trying to compile
      in CCL.  There are still too many test failures in CCL.
      a13502c2
  5. 21 Dec, 2009 2 commits
    • Liam Healy's avatar
      Move foreign-array and foreign-friendly to grid · a9cf4a74
      Liam Healy authored
      Continuing the separation of definitions useful for any libraries
      using C arrays, foreign-array.lisp and foreign-friendly.lisp have been
      moved to the grid subdirectory and placed in the c-array package.
      All tests pass on SBCL 64,
      TOTAL: 1627 assertions passed, 6 failed, 0 execution errors.
      a9cf4a74
    • 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. 01 Nov, 2009 1 commit
    • Liam Healy's avatar
      Unify radix2 forward transforms over real and complex types · 9d22c860
      Liam Healy authored
      The individual real and complex defmfuns for forward transforms have
      been removed from fft-real.lisp and fft-complex.lisp and unified in
      fft-interface.lisp as forward-fourier-transform-radix2 and
      forward-fourier-transform-nonradix2.  This is untested and is meant to
      experiment with unification of the functions; if successful, the other
      functions should be changed as similarly, and radix2/non-radix2 switch
      incorporated if possible.
      9d22c860
  7. 16 Apr, 2009 1 commit
    • Liam Healy's avatar
      New macro foreign-funcall-indirect · bdaaaeb2
      Liam Healy authored
      Move body-expand and the supporting cast to a new file
      body-expand.lisp, and introduce foreign-funcall-indirect which will
      use with-foreign-objects to allocate all arguments at additional level
      of indirection and make the appropriate assignments.  This appears to
      expand correctly except for values that are not symbols,
      e.g. (mpointer object) used in set-all.  I will need a new syntax for
      specifying structures that are passed by pointer but which need to
      have the structure type stated, e.g. solve-cubic-complex, because for
      now it defmfun will expand into the foreign-funcall-indirect.
      bdaaaeb2
  8. 12 Apr, 2009 1 commit
    • Liam Healy's avatar
      Use FSBV; complex-types.lisp work · bf7b9bc7
      Liam Healy authored
      Use Foreign Structures By Value (FSBV) to handle passing and returning
      complex scalars defined by one of the GSL structs.  This works
      correctly for the four functions in complex.lisp, but there is
      compiler error in SBCL on set-all: "cannot use values types here",
      though the expansion looks correct.  Does not work on
      solve-quadratic-complex and solve-cubic-complex in polynomial.lisp
      because defmfun takes the structure type specified and converts it to
      :pointer automatically.  Not tried on functions that return complex
      scalars yet.
      bf7b9bc7
  9. 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
  10. 04 Apr, 2009 1 commit
    • Liam Healy's avatar
      Added integration methods QAWS, QAWO, QAWF; new tests for numerical integration · 2217c408
      Liam Healy authored
      Integration methods 
      integration-QAWS: adaptive integration for singular functions
      integration-QAWO: adaptive integration for oscillatory functions
      integration-QAWF: adaptive integration for Fourier integrals
      have been added in a file numerical-integration-with-tables.lisp.
      These require tables with are new mobjects.  All of the tests from GSL
      in gsl-1.11/integration/test.c and gsl-1.11/integration/tests.c for
      ported functions are now in either this file or
      numerical-integration.lisp. 
      SBCL 64: TOTAL: 1522 assertions passed, 5 failed, 0 execution errors.
      CCL 64:  TOTAL: 1525 assertions passed, 2 failed, 0 execution errors.
      2217c408
  11. 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
  12. 01 Apr, 2009 1 commit
    • 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
  13. 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
  14. 29 Mar, 2009 1 commit
    • 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
  15. 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
  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. 15 Mar, 2009 1 commit
    • 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
  18. 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
  19. 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
  20. 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
  21. 25 Feb, 2009 1 commit
    • Liam Healy's avatar
      For obsolete GSL versions, handle multiple function names correctly · 3f2965ca
      Liam Healy authored
      Quote the gsl-names in case it is a list of multiple functions when
      passing it to the #'error call for signalling 'obsolete-gsl-version.
      Also change declaration to ignorable from ignore and remove lambda
      list keywords to minimize style warnings for obsolete versions.
      3f2965ca
  22. 24 Feb, 2009 1 commit
    • Liam Healy's avatar
      Optional arguments for linear algebra functions; unification of solve and svx · fa1dbfc1
      Liam Healy authored
      Most linear algebra functions now have optional arguments which create
      workspace and answer arrays.  All solver function that have _solve
      (separate solution vector) and _svx (solve in-place) forms have been
      unified into a single CL function.  In qrpt functoins where signum is
      computed, it is no longer taken as input but allocated internally and
      return as one of the multiple values.  This necessitated a change in
      body-expand that will now apply the cl-convert-form conversion to
      returned variables that are part of a multiple value list for
      :return.
      fa1dbfc1
  23. 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
  24. 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
  25. 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
  26. 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
      Direct use of callbacks in functions · 575fe965
      Liam Healy authored
      Simple function passing to functions which don't use mobjects is
      possible with some modifications to defmfun which treat the C argument
      'callback and the CL argument 'function specially, generating a
      callback structure based on 'gsl-function and filling it
      appropriately.  Ported numerical-differentiation and
      numerical-integration.  Also simplified calls in numerical-integration
      by making the workspace argument optional and at the end of the
      arglist; it defaults to the right size based on 'limit.  Changed one
      of the tests for numerical-integration because the limit test doesn't
      make sense with the workspace automatically allocated.
      575fe965
  27. 01 Feb, 2009 1 commit
    • Liam Healy's avatar
      Polynomial uses #'evaluate · cbcc15dd
      Liam Healy authored
      Polynomial evaluation is now done with a method of #'evaluate.  We
      can't do complex evaluation because the return value would be complex,
      and there is no way to handle that in CFFI yet.  Evaluation with
      divided differences is a keyword switched part of the same method; it
      works but gives an puzzling style warning in SBCL about the keyword.
      The use of an marray in an optional/key argument necessitated a change
      to defmfun that redefined #'body-expand from #'body-no-optional-arg,
      made #'body-no-optional-arg a new function that wraps necessary
      array-handling forms around the expanded unswitched body form from
      body-expand.
      cbcc15dd
  28. 25 Jan, 2009 1 commit
    • Liam Healy's avatar
      Keyword arguments to defmobject · cd6a85f8
      Liam Healy authored
      Change optional arguments to defmobject to keyword arguments, and add
      :gsl-version argument that will create the maker function to signal an
      error if the installed version of GSL is too old.
      cd6a85f8
  29. 16 Jan, 2009 1 commit
    • Liam Healy's avatar
      New directory "calculus" and small changes · 65a33d3e
      Liam Healy authored
      New directory "calculus" to hold numerical-differentiation,
      numerical-integeration, and monte-carlo.  Converted some return array
      arguments in BLAS to optional arguments.  Define a condition
      'obsolete-gsl-version to use in #'complete-definition.  Try to
      incorporate cygwin into init.lisp; needs testing by a cygwin user.
      65a33d3e
  30. 15 Jan, 2009 1 commit
    • Liam Healy's avatar
      Pass complex scalars to GSL functions · 4647599b
      Liam Healy authored
      By sending the two parts of a complex as separate doubles (complex
      double-float), or packing the two parts into a one double-float
      argument (complex single-float), it is possible to pass complex
      numbers in GSL function calls.  This is very likely to be
      non-portable, so a test is conducted and the results
      in *pass-complex-scalar-as-two-reals* determine whether defmfun does
      this translation or just creates a function that signals an error.
      The complex tests have been modified so that no longer expect an
      error:
      SBCL 64: TOTAL: 1223 assertions passed, 5 failed, 0 execution errors.
      CCL 64: TOTAL: 1228 assertions passed, 0 failed, 0 execution errors.
      This also works in 32 bit SBCL.
      4647599b
  31. 12 Jan, 2009 1 commit
    • Liam Healy's avatar
      Redefine #'copy · 419e70d4
      Liam Healy authored
      Redefine #'copy so that it has one required argument (source) and one
      optional argument (destination).  For marrays, create a destination
      using make-marray, if one was not given, and then use the memcpy
      functions to fill the values.  For all other mobjects, copy will copy
      objects by calling one of two generic functions, #'copy-to-destination
      and #'copy-making-destination, depending on whether a destination was
      supplied.  The former is defined if a GSL _memcpy function exists.
      The latter will look for a GSL _clone function, then make a CL
      instance with the pointer returned as mpointer.  If there is no clone
      function, it will attempt to make a new object using make-load-form,
      so will fail if that method has not been defined.
      
      Added a check to defmfun that signals an error if a variable is used
      in the C arguments other than top-level that is not used in the CL
      arglist.  This should not happen and is usually an indication of a
      typo.
      419e70d4
  32. 11 Jan, 2009 2 commits
    • Liam Healy's avatar
      Non-symmetric eigensystems, array outputs for special functions · 12c2be7e
      Liam Healy authored
      Added some functions introduced in GSL 1.9 to solve eigenvectors and
      eigenvalues for non-symmetric matrices.  These are untested as yet.
      Changed array output for special functions to be optional arguments
      which can take a size (integer) and create a marray of the right
      size.
      12c2be7e
    • Liam Healy's avatar
      Use &aux definitions in defmfun; clean up foreign-friendly definitions · 0b69f21e
      Liam Healy authored
      Add &aux to defmfuns to that e.g. array arguments can optionally take
      a size and make an array (bessel.lisp).  Remove several unused
      definitions in foreign-friendly held over from ffa.
      SBCL 64: TOTAL: 1223 assertions passed, 5 failed, 0 execution errors.
      CCL 64: TOTAL: 1228 assertions passed, 0 failed, 0 execution errors.
      0b69f21e
  33. 08 Jan, 2009 1 commit
    • Liam Healy's avatar
      Split defmfun.lisp; modify index.html · d2018a78
      Liam Healy authored
      Split out defmfun into three files because it was getting unwieldy.
      Small rearrangement of documentation with an update to adsf
      instructions.  64 bit tests results as before.
      d2018a78