1. 16 Feb, 2009 1 commit
  2. 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
  3. 07 Feb, 2009 3 commits
    • Liam Healy's avatar
      Define callbacks with #'make-callbacks form at top level · 866e84bd
      Liam Healy authored
      Defined a new macro #'make-callbacks that is invoked at top level.  It
      is given the mobject class name, the function name(s), dimension(s)
      and whether it should assume scalar input/output.  It will define the
      appropriate callbacks for use in the mobject.  This eliminates the
      need for defun* and should work with all CL implementations.  Tested
      on both roots-multi only.
      866e84bd
    • Liam Healy's avatar
      Use new 'callback-included classes for all roots-multi · 5079794d
      Liam Healy authored
      Converted roots solver using the derivative to the new class
      definition based on 'callback-included.  Now example
      #'roots-multi-example-derivative works.  Removed unneeded
      definitions.
      5079794d
    • Liam Healy's avatar
      Class 'callback-included has slots with struct information · 42e73fd8
      Liam Healy authored
      The class 'callback-included has the following slots:
      cbstruct-name, array-type, callback-labels, functions, dimensions;
      the first three will be :allocation :class in all subclasses.
      This has been implemented and tested with the 
      'multi-dimensional-root-solver-f object in roots-multi.lisp.  The
      example #'roots-multi-example-no-derivative works.
      42e73fd8
  4. 04 Feb, 2009 1 commit
    • Liam Healy's avatar
      Hacked changes define cbstruct in mobject maker · 0dbbb5e4
      Liam Healy authored
      Have the mobject maker build the cbstruct.  This is now hacked in and
      works with roots-multi in #'roots-multi-example-no-derivative, but
      with #'make-multi-dimensional-root-solver-f having a hardwired
      dimension of 2.  No clear way to communicate the dimension(s) from the
      other part of the defmobject form.  Started to think/write a subclass
      'callback-included of 'mobject, but this may be overkill as all
      variables except 'dimensions are exclusive to the cbstruct maker
      itself so don't really need to be class slots.
      0dbbb5e4
  5. 02 Feb, 2009 1 commit
    • Liam Healy's avatar
      Split up definition of defmobject, add definition of defun* · 7b9eb8c5
      Liam Healy authored
      The definition of defmobject has become too large so the parts that
      are responsible for construction of the various functions are broken
      out as functions:
        make-initialize-instance
        make-reinitialize-instance
        mobject-maker
      
      The definition of callbacks for GSL will be changed so that the
      callback function (defmcallback) is defined at the time the function
      is defined, and the callback GSL structure is made (defcbstruct) at
      the time the corresponding defmobject is made, along with a freeing
      function to add to the finalizers.  (For callbacks used in functions
      without mobjects, the struct will be allocated before and then freed
      after the call.)  As a first step toward this organization, defun* is
      defined to handle in one form the definition of a CL function and of a
      callback.
      7b9eb8c5
  6. 27 Jan, 2009 1 commit
    • Liam Healy's avatar
      Non-native and :callback-toplevel-only fixes · 86da4ec7
      Liam Healy authored
      Fixed several bugs that affected non-native implementations, where
      :inputs, :outputs, or both were not properly declared.  According to
      the CFFI manual, "Portability note: defcallback will not work
      correctly on some Lisps if it's not a top-level form." Evidently, this
      includes Clozure CL, so a new symbol :callback-toplevel-only has been
      pushed onto *features* if openmcl.  This changes examples with
      callbacks to define the callbacks in a separate defparameter rather
      than in-line when the mobject is made of the function is called.  As a
      result of both these changes, the only errors left in CCL tests were
      ones seen previously.  
      CCL 64: TOTAL: 1259 assertions passed, 3 failed, 0 execution errors.
      SBCL 64: TOTAL: 1257 assertions passed, 5 failed, 0 execution errors.
      86da4ec7
  7. 25 Jan, 2009 2 commits
    • 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
    • Liam Healy's avatar
      Use lambda forms in callbacks · b134ed94
      Liam Healy authored
      It is possible to use lambda forms as well as function names in
      callback definers; this is demonstrated in the Monte Carlo example.
      Eliminated make-mfunction and folded its functionality into
      make-solver-functions.  Added a section to the documentation to
      explain how function definitions work.
      b134ed94
  8. 24 Jan, 2009 2 commits
    • Liam Healy's avatar
      Define callbacks by returning the struct pointer, without setting specials · f0c7ecec
      Liam Healy authored
      Macro defcbstruct and all the macros built on it now simply return the
      C struct needed by GSL functions instead of binding a special whose
      name is then passed to the GSL functions.  Specials can still be used
      of course in the standard way like defparameter, but the results can
      also be bound locally with a let or passed in directly.  The name of a
      callback passed to defmcallback and to defcbstruct in all the macros
      that expand both is now gensymmed (since it is used only long enough
      to put in a slot of the cbstruct) instead of taken to be the name of
      the CL function, in order to make clear the different objects.
      Unfortunately, there is appears to be a bug in CFFI using defcallback
      with an uninterned symbol in CCL, so I have put a workaround in.
      However, there is still another error even with this workaround.
      Thus test results are:
      SBCL 64: TOTAL: 1248 assertions passed, 5 failed, 0 execution errors.
      CCL 64: TOTAL: 1229 assertions passed, 2 failed, 6 execution errors.
      f0c7ecec
    • Liam Healy's avatar
      Relocate definition, optional arguments, nonlinear least squares streamline · 42cf5a7b
      Liam Healy authored
      Moved gsl-mfunction, def-mfunction, and gsl-mfunction-fdf from
      roots-multi.lisp to generic.lisp because they are common to several
      files in the solve-minimize-fit module.  Made arguments default
      instead of required in #'linear-mfit, linear-mfit-svd,
      weighted-linear-mfit, weighted-linear-mfit-svd.  Most of these do not
      have examples, so untested.  This required new functions
      #'default-covariance, #'default-lls-workspace.  Renamed examples to
      #'linear-least-squares-univariate-example and
      #'linear-least-squares-multivariate-example, and changed to
      'print-details.  Revised definitions in nonlinear least squares to
      streamline data flow; there is no setup function or global
      pre-declaration of the number of parameters or observations required
      anymore.  The example function now called
      nonlinear-least-squares-example will take the number of observations
      and the fitter method as optional arguments.
      42cf5a7b
  9. 23 Jan, 2009 1 commit
    • Liam Healy's avatar
      Minimization will take scalar functions, added tests, optional printing · 78b88074
      Liam Healy authored
      The minimization functions may now take and return scalars or marrays.
      The examples take optional arguments with the solver method and
      whether to print the steps.  They are now part of the #'examples and
      test suite.  Use maref instead of cl-array in
      #'roots-multi-example-no-derivative.  Add optional solver method to
      roots one and roots multi, and add tests for all solvers.
      78b88074
  10. 22 Jan, 2009 1 commit
  11. 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
  12. 03 Jan, 2009 1 commit
    • Liam Healy's avatar
      Generic functions for solve-minimize-fit · f6c5e260
      Liam Healy authored
      Introduced in generic.lisp the generic functions iterate, solution,
      function-value, last-step.  These replace regular functions with
      solver-specific names.
      f6c5e260
  13. 30 Dec, 2008 1 commit
    • Liam Healy's avatar
      Define duplicate functions with defun · 8a8148f8
      Liam Healy authored
      The duplicate example functions for solving and minimizing are defined
      with defun now instead of setf fdefinition in the hopes of minimizing
      warnings and messages from some compilers.  Eliminated obsolete
      comments.
      8a8148f8
  14. 29 Dec, 2008 1 commit
    • 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
  15. 27 Dec, 2008 1 commit
    • Liam Healy's avatar
      Set mpointer vlaue, show relevant .h file; non-int return for reinitialize-instance · 8a0ac730
      Liam Healy authored
      In defmobject, set the mpointer value if #'allocate is being called.
      For each file that defines a defmobject, I put a comment at the top
      showing the relevant GSL header file.  For generators and quasi, the
      (re)initializing function returns void and not an :int, so that is
      changed in the defmobject definition, which now permits a list of two
      elements in initialize-suffix, with the second element indicating the
      :c-return.
      8a0ac730
  16. 26 Dec, 2008 2 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
  17. 25 Dec, 2008 1 commit
  18. 08 Dec, 2008 1 commit
    • Liam Healy's avatar
      Array input and output declarations · 1a2ebe96
      Liam Healy authored
      A somewhat comprhensive attempt to make sure :inputs, :outputs, and
      :return arguments in defmfuns match what the function is expecting and
      will return, so that non-native implementations will work correctly
      for copying, and native ones will work correctly for pinning.  The
      :return argument now defaults to :outputs in most circumstances.
      1a2ebe96
  19. 01 Dec, 2008 1 commit
    • Liam Healy's avatar
      GSL array making with make-array* and #m · 83cd8040
      Liam Healy authored
      GSL arrays are garbage-collected objects, and so can be made like any
      other lisp object; they do not need to be make inside a wrapper form.
      #m is a macro which makes them; it expands to a #'make-array* call.
      Examples and usage ported to this new form.  Compiled only; not tested
      yet.  No effort to port to non-native implementation yet; tests as
      expanded in the tests/ directory are not ported yet.
      83cd8040
  20. 16 Nov, 2008 1 commit
  21. 31 Aug, 2008 1 commit
  22. 25 Jul, 2008 2 commits
  23. 24 Feb, 2008 1 commit
  24. 18 Feb, 2008 1 commit
  25. 16 Feb, 2008 1 commit
  26. 04 Feb, 2008 1 commit
  27. 03 Feb, 2008 2 commits
  28. 28 Jan, 2008 1 commit
  29. 21 Jan, 2008 2 commits
  30. 17 Jan, 2008 1 commit
  31. 16 Jan, 2008 1 commit
  32. 14 Jan, 2008 1 commit