1. 22 Jan, 2009 1 commit
  2. 19 Jan, 2009 1 commit
    • Liam Healy's avatar
      More callbacks take and return scalars · f15ffdda
      Liam Healy authored
      More usage of callbacks using or computing multiple quantities
      now do so on scalars because the macros in GSLL pull out the
      individual elements of foreign arrays, and accept multiple values and
      put them into the right foreign arrays.  In roots-multi,
      #'multiroot-slot takes a mobject and extracts the mpointer before
      calling the foreign slot value.  Several examples in
      solve-minimize-fit now have optional 'print-steps argument.  These
      examples are now the basis for additional tests.
      f15ffdda
  3. 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
  4. 30 Dec, 2008 1 commit
  5. 29 Dec, 2008 3 commits
    • Liam Healy's avatar
      Better support for non-native implementations · c01366d6
      Liam Healy authored
      Testing with Clozure reveals more details on the stack overflow
      problem than what CLISP reveals.  This is fixed by using #'slot-value
      instead of #'cl-array in  #'copy-c-to-cl and #'copy-cl-to-c.
      Non-complex arrays were not handled correctly in
      #'copy-array-from-pointer; fixed.  There is a dependency of
      permutation and combination on the definition of #'data-class-name
      through defmfun.  Test results:
      CCL: TOTAL: 1143 assertions passed, 52 failed, 3 execution errors.
      CLISP: TOTAL: 996 assertions passed, 149 failed, 11 execution errors.
      SBCL: TOTAL: 1208 assertions passed, 0 failed, 0 execution errors.
      (But only the second time it's run in SLIME.)
      Variable *print-contents* to disable printing of marray contents in
      print-object; this is helpful for debugging.
      c01366d6
    • Liam Healy's avatar
      Port to non-native implementation and CLISP · b3c65d75
      Liam Healy authored
      Make functional for non-native CL implementation, with allocation of C
      arrays and correct copying between CL and C sides.  Testbed for this
      is CLISP, but CLISP has several problems which may be a problem with
      the GSLL code or may be in CLISP:
       - need to set sys::*inhibit-floating-point-underflow*
       - CLISP doesn't see defconstant defined when it's used in the same file
       - many tests give "Program stack overflow" error and debugging
          procedure not clear
       - failure on amd64 bit platform
      b3c65d75
    • Liam Healy's avatar
      GSL arrays created by GSL functions · 38ddfa1a
      Liam Healy authored
      Made the generic function #'contents-from-pointer that takes a pointer
      to a GSL struct and produces a list of the contents suitable for the
      :initial-contents argument to #'make-marray.  Added an argument
      :from-pointer to #'make-marray that then creates a new marray with the
      same contents.  Some functions in solve-minimize-fit return a pointer
      to a GSL vector with double-floats.  Copying in this way is necessary
      because GSL has malloced the data in a non-CL place.  Sometimes, this
      results in the copying of data whose only further use will be to
      extract a pointer to pass to another GSL function.  Added a method
      to #'mpointer that permits directly passing a pointer, but this isn't
      useful for arrays because there are many element types so the
      functions have been defined as methods.
      38ddfa1a
  6. 27 Dec, 2008 2 commits
  7. 26 Dec, 2008 4 commits
    • Liam Healy's avatar
      Calling mobjects with #'mpointer, generic function #'name · 297c08b2
      Liam Healy authored
      GSL functions that take GSL objects as arguments must have #'mpointer
      called on each argument.  Created a generic function #'name and
      changed all the *-name (or name-*) functions that acted on mobjects to
      this function.
      297c08b2
    • Liam Healy's avatar
      Full use of defmobject; elimination of letm · b09dc9d2
      Liam Healy authored
      All GSL objects are full CL objects with garbage collection.  There is
      no need to manually free the associated memory.  All objects may be
      assigned in the normal CL way, e.g. let, so there is not #'letm macro
      anymore.  Everything compiles cleanly in gsll, but nothing has been
      tested.
      b09dc9d2
    • Liam Healy's avatar
      New class foreign-array, new names: marray, make-marray, mobject.lisp · 7c66d57b
      Liam Healy authored
      New class foreign-array represents foreign (C) arrays, without GSL or
      mobject superclass.  New class name 'marray was 'gsl-data,
      representing arrays in GSL.  These objects are made by #'make-marray,
      formerely #'make-array*.  New file names: init/mobject.lisp was
      init/gsl-objects.lisp and data/marray.lisp was data/data.lisp.
      7c66d57b
    • Liam Healy's avatar
      Permit alternate origin of mpointer; #'clone · 38d9c4f4
      Liam Healy authored
      Redesign #'defmobject so that a new method #'allocate is defined that
      calls the standard GSL allocate function for each object.  Shrink the
      initialize-instance :after method to call #'allocate if the mpointer
      isn't given, and then set the finalizer.  This way, an :mpointer made
      by something other than the allocate function may be supplied to the
      make-instance, and the object will be made correctly.  This is used by
      #'clone functions in histogram and random number generators.  Not
      compiled or tested, but macroexpansions look right.
      38d9c4f4
  8. 25 Dec, 2008 1 commit
  9. 24 Dec, 2008 1 commit
    • Liam Healy's avatar
      GSL object makers with mixed arguments · adbbbbcd
      Liam Healy authored
      GSL objects made with defmobject and that have use at least one
      argument in some way for both initialization and reinitialization, or
      for using functions of those arguments, are accomodated with an
      optional argument 'arglists-function to defmobject.  This should be a
      function that produces three arglists: for the maker, the
      initialization method, and the reinitialization method.  The order of
      arguments generated for other cases is now preserved with :from-end in
      #'variables-used-in-c-arguments.  Examples for interpolation and
      acceleration (lookup), still commented out.
      adbbbbcd
  10. 22 Dec, 2008 1 commit
    • Liam Healy's avatar
      New class mobject, new hierarchy, clean up files · 9b588763
      Liam Healy authored
      Redefine 'mobject from 'gsl-object.  The class 'gsl-data in data.lisp
      is now a subclass of it, and does not explicitly have the mpointer
      slot, because mobject does.  Adapted #'defmobject to work with objects
      that have no "setter" (initialization).  This expands correctly for
      basis-splines (no setter) and hankel (setter).  The basis-splines
      defintions rely on the new mobjects.
      9b588763
  11. 16 Dec, 2008 1 commit
  12. 15 Dec, 2008 1 commit
    • Liam Healy's avatar
      Prototype defmobject · ed5ce113
      Liam Healy authored
      In gsl-objects, define a prototype defmobject which defines:
       - the class for the gsl object
       - initialize-instance :after method to correspond to GSL
        "alloc" and attach the finalizer,
       - define reinitialize-instance :after method to correspond to a setter
        or intialize in GSL,
       - define a make-<class-name> function that will be the customary user
        interface, and will call make-instance and possibly
        reinitialize-instance if defined.
      Worked up example in hankel.lisp.  This compiles successfully and
      looks correct, but has not been tested.
      ed5ce113
  13. 31 Aug, 2008 1 commit
    • Liam Healy's avatar
      Clean up several compilation problems · 134132bc
      Liam Healy authored
      Several bugs with small fixes, modifications to eliminate warnings:
      - Bad names for argument variables in maref fixed.
      - Add depenedencies in gsll.asd to avoid warnings.
      - Histogram needs #'assign-pointer function which was previously
        eliminated.
      - #'scale is a generic function, change defun to defmethod in
        histogram.
      - New #'variables-used-in-c-arguments replaces #'c-arguments in
        defmfun, now is a simplistic code walker but goes to arbitrary
        depth.  This will do for current uses of defmfun.
      - Export and defgenerics for #'alloc, #'free which are used by
        histogram and random.  In gsl-objects.lisp for lack of a better
        place.
      System now completely compiles from scratch with only one warning 
      "Implicitly creating new generic function BIND-GENERATE-BINDINGS."
      which is from metabang-bind.  No new testing.
      134132bc
  14. 24 Aug, 2008 1 commit
    • Liam Healy's avatar
      Method #'cl-array for pointers (gsl-vector-c doubles) · 9bf385d1
      Liam Healy authored
      Define '+foreign-pointer-class+ to be the class name for foreign
      pointers, which will be assumed to be GSL vectors or matrix pointers.
      Use in new method #'cl-array to return a CL array from a pure GSL
      vector double pointer, such as is returned by several functions in
      solve-minimize-fit.
      9bf385d1
  15. 25 Jul, 2008 2 commits
  16. 18 Feb, 2008 1 commit
  17. 16 Feb, 2008 1 commit
  18. 04 Feb, 2008 1 commit
  19. 03 Feb, 2008 3 commits
  20. 28 Jan, 2008 1 commit
  21. 04 Dec, 2006 1 commit
    • liam's avatar
      Changed meaning of #'defun-gsl-all arguments so that the first · 4729f28f
      liam authored
      argument should be a list of element types by themselves
      (e.g. 'double) and not the data type and element type
      ('vector-double).  Hardwire *data-name-alist* to associate these
      symbols with the GSL convention for words that are insterted in
      strings (e.g. (FIXNUM . "_int")).  #'make-symbol-from-strings replaces
      #'data-object-name in new file utility.lisp and splice-name just
      inserts, doesn't remove anything.  These changes permit the definition
      of #'defun-gsl-stats to be defined using #'defun-gsl-all.  Created
      mean-variance.lisp.  Created shuffling-sampling.lisp, which does not
      deal directly with CL objects yet.  Fix broken example in vector.lisp.
      
      
      git-svn-id: svn+ssh://pop/opt/space/mathematics/gsl/trunk@3158 a3d8a0fb-c1db-0310-ace7-a616afeb9e30
      4729f28f