Skip to content
Snippets Groups Projects
  1. May 29, 2009
    • Liam Healy's avatar
      Physical constants added · 722fa9e2
      Liam Healy authored
      All physical constants in gsl/gsl_const_mksa.h and
      gsl/gsl_const_cgsm.h are defined as Lisp constants and exported.  This
      requires a patch to CFFI grovel/grovel.lisp.  Since this patch has
      just been sent to the CFFI mailing list and is not generally
      available, this will remain off the master branch until the patched
      CFFI is generally available.
      722fa9e2
  2. May 25, 2009
    • Liam Healy's avatar
      Use CFFI-grovel to parse physical constants · a683fea3
      Liam Healy authored
      Started writing definitions of constants based on GSL's physical
      constants, using cffi-grovel.  This has not proceeded beyond the first
      definition because cffi-grovel at the present time casts everything to
      an integer.
      a683fea3
    • Liam Healy's avatar
      Use CFFI-grovel to define enumerations and programming constants · 5b255beb
      Liam Healy authored
      Instead of hardwiring GSL's #define or enum values, define them in
      init/libgsl-unix.lisp and run CFFI-grovel on them.  This has the
      advantage that if these values change in GSL, GSLL will automatically
      get the new values; also, there was an error in the 'integrate-method
      enum due to an incorrect starting value.  It has the disadvantage that
      building GSLL now requires a C compiler and some of the header (.h)
      files for GSL.  Also, it's not clear what the form for libgsl-*.lisp
      files are for non-unix OSes.
      5b255beb
    • Liam Healy's avatar
      Generic function #'size replaces #'total-size for marrays · 938ae6d6
      Liam Healy authored
      Use #'size instead of #'total-size for marrays.
      938ae6d6
    • 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
    • Liam Healy's avatar
      Random number distribution functions are methods of #'sample · 09648af2
      Liam Healy authored
      The random number distribution functions have been made methods of
      #'sample, with 'source being the generator.
      09648af2
  3. May 24, 2009
    • Liam Healy's avatar
      Individual named parameters for simulated annealing · 3af4fa78
      Liam Healy authored
      The parameters for simulated annealing
      n-tries iterations-fixed-T step-size k t-initial mu-t t-min
      are now passed as individual arguments to #'simulated-annealing, which
      assembles them into a list for simulated-annealing-int.
      3af4fa78
  4. May 20, 2009
    • Liam Healy's avatar
      Improved speed for simulated annealing example using declarations · 857d03bb
      Liam Healy authored
      Added type declarations for callbacks; this reduces execution time
      from 28 seconds to 24 seconds.
      857d03bb
    • Liam Healy's avatar
      Simulated annealing loaded in defsystem · 5e1b9c33
      Liam Healy authored
      Simulated annealing is now loaded with the defsystem, and its presence
      advertised in documentation/index.html.  The file
      simulated-annealing.lisp has been moved to solve-minimize-fit.
      The GSL "make check" tests have been added at the end of the file, but
      they are not added to GSLL's examples/tests yet because of how slow it
      runs.
      5e1b9c33
    • Liam Healy's avatar
      Simulated annealing functioning · 1bc6155e
      Liam Healy authored
      Simulated annealing now works.  The trivial example given in GSL
      source doc/examples/siman.c is coded up at the end of
      simulated-annealing.lisp.  Both versions produce the same
      answer,
           1.36313001299
      #<VECTOR-DOUBLE-FLOAT #(1.3631300129927695d0)>
      Note that the parameters for this example are slightly different than
      what is given in the manual; the manual version of the parameters are
      commented out in #'simulated-annealing-example.
      The Lisp version takes about 26.5 seconds, the C version about 0.85
      seconds.
      1bc6155e
  5. May 18, 2009
    • Liam Healy's avatar
      Simulated annealing state functions, example · f4892b96
      Liam Healy authored
      Created #'sa-state-value, #'make-sa-states, #'make-new-sa-state,
      #'copy-sa-state and use them in the callbacks.  Argument match between
      #'simulated-annealing and #'simulated-annealing-int.  Trivial example
      ported but fails in assigning parameter values when run.
      f4892b96
  6. May 17, 2009
  7. May 12, 2009
  8. May 08, 2009
  9. May 06, 2009
  10. May 04, 2009
  11. May 03, 2009
    • Liam Healy's avatar
      Complex functions · 149844bb
      Liam Healy authored
      Additional definition of functions of complex numbers and/or returning
      complex numbers.  Most of these duplicate functions that Lisp has
      already, so everything is defined with a "cx-" prefix.  No effort has
      been made to unify the interface; this requires some thought.  A fix
      has been made to body-expand; previously, it would not properly
      compile a function that returned a structure by value but didn't have
      structures by value as arguments.
      149844bb
    • Liam Healy's avatar
      Portable calls functions passing complex scalars with FSBV · da11ae0a
      Liam Healy authored
      Merge branch 'fsbv' that had integration of FSBV system into GSLL,
      which permits the portable calling of functions that call functions
      that pass or return structures by value.
      da11ae0a
    • Liam Healy's avatar
      Improved documentation · 0e0e3f9d
      Liam Healy authored
      More accurate description of how to use FSBV; better organization of
      the download/install section.
      0e0e3f9d
    • Liam Healy's avatar
      Define fsbv:defcfun for efficiency · 8d2ef1de
      Liam Healy authored
      For FSBV calls, define fsbv:defcfun in the defmfun expansion, then in
      the fsbv:foreign-funcall, refer to the symbol function name rather
      than string function name.  This tells FSBV to use the prepared
      closure associated with that function by the fsbv:defcfun, meaning
      that the definitions in that lexical environment are reused.
      
      Fix conditionalization for #'conjugate-rank-1-update in blas2.lisp.
      
      Test results:
      SBCL 64 #+fsbv
      TOTAL: 1522 assertions passed, 5 failed, 0 execution errors.
      CCL 64 #+fsbv
      TOTAL: 1522 assertions passed, 5 failed, 0 execution errors.
      SBCL 64 #-fsbv
      TOTAL: 1502 assertions passed, 5 failed, 0 execution errors.
      CCL 64 #-fsbv
      TOTAL: 1502 assertions passed, 5 failed, 0 execution errors.
      8d2ef1de
    • Liam Healy's avatar
      Conditionalize FSBV · 8a08f552
      Liam Healy authored
      All source code is now conditionalized so that FSBV is optional.  If
      present, functions using complex scalars will work.  If absent, GSLL
      will compile and load correctly, and all functions except those using
      complex scalars will work.  The examples and tests are defined
      appropriately.  Documentation on FSBV dependence has been added to
      index.html.
      8a08f552
    • Liam Healy's avatar
      Call GSL functions with complex scalars · 0ca58836
      Liam Healy authored
      With improved fsbv:foreign-funcall that does the conversion of values
      between Lisp and C, the function foreign-funcall-indirect has been
      eliminated in favor of using fsbv:foreign-funcall directly.  Spot
      checks on various functions that use complex scalars like #'evaluate
      polynomials at a complex point, or set-all on complex marrays, or the
      functions in complex.lisp, show that these all work.  Everything
      compiles/loads and the usual tests pass in SBCL.
      0ca58836
  12. Apr 30, 2009
    • Liam Healy's avatar
      Fix lisp-unit:numerical-equal definition · e0df4389
      Liam Healy authored
      Method lisp-unit:numerical-equal on marrays always returned T; now
      fixed.
      e0df4389
    • Liam Healy's avatar
      Use FSBV for functions taking complex scalars · 913040d8
      Liam Healy authored
      The BLAS matrix-product functions now work on complex arrays using
      FSBV, but there are no tests yet.  New tests vector-set-all and
      matrix-set-all replace set-all tests with addition, and work for all
      types including complex using FSBV.  Default optional argument marrays
      are initialized to 0.  Polynomial evaluation with complex argument
      uncommented, but not yet working.
      913040d8
  13. Apr 28, 2009
  14. Apr 27, 2009
    • Liam Healy's avatar
      Redeclare foreign-allocated variables called by reference · 9848c6ad
      Liam Healy authored
      Variables called using with-foreign-objects that are passed to GSL for
      the purposes of returning computed values (i.e., are not mentioned in
      the CL arglist) need to be declared (:pointer type) because they are
      calls by reference.  Everything now compiles though there are
      execution errors in the tests.
      9848c6ad
  15. Apr 26, 2009
    • Liam Healy's avatar
      Use fsbv:defcstruct for complex, type spec (:pointer type) · 0b3847ba
      Liam Healy authored
      Define complex-float-c and complex-double-c using fsbv:defcstruct so
      that they can be passed by value.  A type specification of the form
      (:pointer type) is accepted for allocated objects passed by reference
      to foreign functions so that their values can be set and returned from
      the CL function.  This expands correctly for #'minmax, not tested
      yet.
      0b3847ba
  16. Apr 20, 2009
    • Liam Healy's avatar
      Use fsbv:with-foreign-objects in body-expand · 8dea4bbc
      Liam Healy authored
      The setting of foreign structures will now be handled by
      fsbv:with-foreign-objects for a suitably defined fsbv:defcstruct. 
      The new definitions are loaded but GSLL will not compile completely.
      8dea4bbc
  17. Apr 16, 2009
    • Liam Healy's avatar
      Tests marrays directly · 64a0b6c2
      Liam Healy authored
      Thanks to Malcolm Reynolds and Tom Hermann, lisp-unit:numerical-equal
      is now a generic function, so in the new file test-unit/augment.lisp,
      a method has been defined to work on marrays.  This now permits the
      direct comparison in tests of marrays, rather than looking at their CL
      equivalent with cl-array.  So far the only test changed is
      vector-add.
      64a0b6c2
    • 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
  18. Apr 12, 2009
    • 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
  19. Apr 05, 2009
    • 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
  20. Apr 04, 2009
    • 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
    • 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
  21. Apr 03, 2009
    • 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
    • Liam Healy's avatar
      Polynomial order of and optional arguments; added tests from GSL · 26a5e307
      Liam Healy authored
      Change the order of arguments to #'divided-difference and
      #'taylor-divided-difference in order to make 'dd in the first case and
      'coefficients and 'workspace in the second case optional arguments.
      Added all the tests from gsl-1.11/poly/test.c; results agree with the
      values stated there.  Complete test results:
      SBCL64: TOTAL: 1483 assertions passed, 5 failed, 0 execution errors.
      CCL64:  TOTAL: 1486 assertions passed, 2 failed, 0 execution errors.
      26a5e307
  22. Apr 02, 2009
    • 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
    • Liam Healy's avatar
      Monte Carlo has more optional arguments · c0c80c3d
      Liam Healy authored
      Arguments now optional to make-monte-carlo-plain: 
      (number-of-samples
             (* *monte-carlo-default-samples-per-dimension*
      	  (dim0 lower-limits)))
      (generator (make-random-number-generator +mt19937+ 0))
      (state (make-monte-carlo-plain (dim0 lower-limits)))
      (scalars t)
      and similarly for -vegas, -miser.  Argument 'number-of-samples renamed
      from 'calls to clarify.
      c0c80c3d
  23. Apr 01, 2009
    • Liam Healy's avatar
      Pass functions with function-designators only; no make-callback · 8a30ea5a
      Liam Healy authored
      Functions to pass to GSL are no longer "declared" with make-callback.
      Instead, callbacks for each application that needs them are created at
      compile time.  These callbacks will funcall a dynamic (special)
      variable which will be bound to a "funcallable" function that is
      generated and compiled at object-creation time or defmfun runtime.
      All expected tests pass:
      SBCL 64: TOTAL: 1451 assertions passed, 5 failed, 0 execution errors.
      CCL 64:  TOTAL: 1454 assertions passed, 2 failed, 0 execution errors.
      
      Merge branch 'dynamic-callback'
      8a30ea5a
Loading