 19 Feb, 2009 1 commit


Liam Healy authored
Added faster simplex mininimser using the symbol +simplexneldermead+; the old one is now called +simplexneldermeadon2+. 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".

 18 Feb, 2009 1 commit


Liam Healy authored
Added +halton+, +reversehalton+ to random/quasi.lisp. Added #'multilinearresiduals in solveminimizefit/linearleastsquares.lisp. Changed +sobol+, +niederreiter2+ from *..* apparently overlooked before. #'choleskysolve now written so that if xspec = T, a marray is created and the solution put in it and returned. If it is NIL, the solution will replace b. This required a modification to expanddefmfungeneric to remove &aux args from the defgeneric arglist. solveminimizefit/linearleastsquares.lisp Specify the weight as an optional argument, unifying the weighted and unweighted functions: linearfit, multiplierfit, linearmfit, linearmfitsvd. This necessitated a change in the order of the arguments. Changed call in basissplines.lisp.

 17 Feb, 2009 2 commits


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 inplace) now combined into a single generic function with an optional argument #'choleskysolve. 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 #'exponentialintegralEn for nthorder exponential integral.  Also rewrote #'callbacksetslots and #'bodyexpand 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.

Liam Healy authored
Added definitions for GSL features that were added in version 1.9, and one from version 1.10: mminusp, mplusp, nonnegativep, +knuthran2002+, +vectorbfgs2+. Macros defmpar now has key instead of optional args. It and defrngtype take a gslversion argument; any symbols that are not defined in the user's version of GSL will be bound to an instance of 'obsoletegslversion but it is not signalled.

 16 Feb, 2009 6 commits


Liam Healy authored
Added all Mathieu functions and tests that match the GSL tests.

Liam Healy authored
SBCL gets confused about what &key arguments are acceptable for generic functions, so &allowotherkeys is added for SBCL only in the defgeneric of #'evaluate.

Liam Healy authored
The generalized (symmetric and nonsymmetric) eigensystem definitions have been added, and four separate files made for all eigensystem definitions. Not too much attention has been paid to consistent or unified names.

Liam Healy authored
Rename constant pointers into the GSL library to +...+ from *...*.

Liam Healy authored
Merge branch 'refactoringcallbacks'

Liam Healy authored
Direct function callbacks may now be used with GSL structs other than 'gslfunction, 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 makecallbacks 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.

 15 Feb, 2009 8 commits


Liam Healy authored
As a way of making it easier to use something other than a gslfunction and with additional slots set, and to make more clear where specific variable names are treated specially, define and use: callbackargp callbackreplacearg callbackremovearg callbacksetslots Also split off #'setcbstruct which #'makecbstruct and callbacksetslots both use.

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 'gslfunction and filling it appropriately. Ported numericaldifferentiation and numericalintegration. Also simplified calls in numericalintegration 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 numericalintegration because the limit test doesn't make sense with the workspace automatically allocated.

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 defmakecallbacks for 'singlefunction. This works for chebyshev, minimizationone, and rootsone, and it should be applicable to callbacks sent directly to functions without being stored in mobjects.

Liam Healy authored
Chebyshev object now built on callbacksincluded. The example/test was generating an error because the calls in integralchebyshev and derivativechebyshev did not have a needed #'mpointer call. This has been fixed and the test results match the previous result given in 8d9ce4e8.

Liam Healy authored
Define a finalizer for callback structure in CL slot, so that when the object is garbage collected, the foreign space for the callback is also removed. Deleted duplicate definition of makecbstructobject.

Liam Healy authored
The arguments have been changed in applystep, applyevolution so that they match for the first three arguments. The function name applystep was changed so the two are similar. The macro withodeintegration defines a local function #'nextstep instead of a symbol macro 'makenextstep because symbols in the body of a simple loop violate the CL standard. Some documentation has been updated with the contribution of Mirko Vikovic.

Liam Healy authored
Changed the code so that the callback struct is now in odestepper instead of odeevolution, because all solvers need stepper but only variable step integrators need evolution. The ode examples/tests work.

Liam Healy authored
Mobject 'odeevolution is now made as a subclass of 'callbacksincludedcl, a new class that is a subclass of 'callbacksincluded, but which stores the cbstruct pointer in a CL slot rather than in a foreign struct. This example is correct, (integratevanderpol 1.0d0 1.d4 *steprk4* nil) 40 1.0d0 1.4568569264026898d0 11.547449151779395d0

 14 Feb, 2009 1 commit


Liam Healy authored
Nonlinear least squares now works using callbacksincluded. This necessitated naming the components of dimensions individually (numberofobservations numberofparameters). This is done with added slot 'dimensionnames to the callbacksincluded class and an argument of the same name to #'defcisubclass which defaults to '(dimensions). Because of the default, the other defmobject usage need not be changed.

 13 Feb, 2009 2 commits


Liam Healy authored
Conditionalize the array copy 64bit tests matrixcopytoclandback.lisp and vectorcopytoclandback.lisp with #+int64 so they don't run on 32 bit computers.

Liam Healy authored
Tests of copying marrays to and from CL.

 12 Feb, 2009 1 commit


Liam Healy authored
The function #'copy will now copy contents between marrays and CL arrays. The destination array can be supplied literally, or created by this function by specifying the desired type: when copying from a marray to a CL array, specify 'array; when copying from a CL array to a marray, specify the element type of the marray. For example, (COPY (COPY (MAKEMARRAY '(COMPLEX DOUBLEFLOAT) :INITIALCONTENTS '((34.5 8.24 3.29 8.93 34.12 6.15) (8.93 34.12 6.15 49.27 13.49 32.5) (49.27 13.49 32.5 42.73 17.24 43.31))) 'ARRAY) '(COMPLEX DOUBLEFLOAT)) copies from the matrixcomplexdoublefloat made in the makemarray form to a CL array, then copies the contents to a new matrixcomplexdoublefloat.

 11 Feb, 2009 2 commits


Liam Healy authored
In #'makemarray, :clarray argument will build that marray out of a CL array. This CL array should have been generated with #'makeffa; this symbol 'makeffa is now exported for users.

Liam Healy authored
Some parameters to the make* function for mobjects are taken as lists (like 'functions, 'dimensions) but for some mobjects it only makes sense to supply one. In these cases, the :singular argument to defmobject indicates that that argument is to be put in a list before being passed to the next function.

 10 Feb, 2009 1 commit


Liam Healy authored
Ported onedimensional minimizer to callbacksincluded. Callbacks may be defined either using scalars or marrays. The examples work.

 09 Feb, 2009 2 commits


Liam Healy authored
New macro #'defmakecallbacks will expand to the appropriate defmethod for makecallbackfn, so that the defmcallbacks are defined appropriately.

Liam Healy authored
Ported onedimensional minimizer to callbacksincluded, mostly by cut and paste. The examples work.

 08 Feb, 2009 2 commits


Liam Healy authored
The onedimensional root solvers in rootsone.lisp now works in the callbacksincluded object, including both examples, with and without derivatives. The noderivative case has been modified to automatically listify the function name given. For callbacksincluded classes that do not define 'dimensions (because they are onedimensional), there is a new macro defcisubclass1d that makes 'dimensions slot a class slot with '(1). Defined a printobject method for callbacksincluded classes.

Liam Healy authored
Now define onedimensionalrootsolverf on 'callbacksincluded. This needs some modification to mobject to add the 'functions slot argument and remove 'dimensions from the cbstruct when it is not in the allocation arguments. The :functions argument must be given as a list, even though there's only one function. The example (rootsoneexamplenoderivative) works.

 07 Feb, 2009 3 commits


Liam Healy authored
Defined a new macro #'makecallbacks 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 rootsmulti only.

Liam Healy authored
Converted roots solver using the derivative to the new class definition based on 'callbackincluded. Now example #'rootsmultiexamplederivative works. Removed unneeded definitions.

Liam Healy authored
The class 'callbackincluded has the following slots: cbstructname, arraytype, callbacklabels, functions, dimensions; the first three will be :allocation :class in all subclasses. This has been implemented and tested with the 'multidimensionalrootsolverf object in rootsmulti.lisp. The example #'rootsmultiexamplenoderivative works.

 04 Feb, 2009 1 commit


Liam Healy authored
Have the mobject maker build the cbstruct. This is now hacked in and works with rootsmulti in #'rootsmultiexamplenoderivative, but with #'makemultidimensionalrootsolverf 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 'callbackincluded 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.

 02 Feb, 2009 1 commit


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: makeinitializeinstance makereinitializeinstance mobjectmaker 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.

 01 Feb, 2009 1 commit


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 #'bodyexpand from #'bodynooptionalarg, made #'bodynooptionalarg a new function that wraps necessary arrayhandling forms around the expanded unswitched body form from bodyexpand.

 29 Jan, 2009 1 commit


Liam Healy authored
Turned many functions, particularly those having to do with interpolation, into generic functions and methods, and thus renamed them and changed their arglists. Added test for basis spline; it works in SBCL but does not in CCL.

 27 Jan, 2009 2 commits


Liam Healy authored
Placed missing #'mpointer calls, added :input declarations in defmfuns. Fixed #'splineexample to work correctly with marrays, and added a test.

Liam Healy authored
Fixed several bugs that affected nonnative 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 toplevel form." Evidently, this includes Clozure CL, so a new symbol :callbacktoplevelonly has been pushed onto *features* if openmcl. This changes examples with callbacks to define the callbacks in a separate defparameter rather than inline 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.

 26 Jan, 2009 1 commit


Liam Healy authored
The macro withodeintegration has been significantly altered, using marrays and symbol macros to make integration forms easier. There are now 10 ode tests, one for each of the supplied steppers.

 25 Jan, 2009 1 commit


Liam Healy authored
ODE control is now done with GSL objects, including a superclass 'odecontrol.
