- May 29, 2009
-
-
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.
-
- May 25, 2009
-
-
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.
-
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.
-
Liam Healy authored
Use #'size instead of #'total-size for marrays.
-
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.
-
Liam Healy authored
The random number distribution functions have been made methods of #'sample, with 'source being the generator.
-
- May 24, 2009
-
-
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.
-
- May 20, 2009
-
-
Liam Healy authored
Added type declarations for callbacks; this reduces execution time from 28 seconds to 24 seconds.
-
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.
-
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.
-
- May 18, 2009
-
-
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.
-
- May 17, 2009
-
-
Liam Healy authored
Remove old definitions in simulated annealing, define #'simulated-annealing and supporting functions including the defmfun #'simulated-annealing-int. Callbacks and specials are defined. Mostly compiled, still some fixes needed before testing.
-
- May 12, 2009
-
-
Liam Healy authored
Some 64 bit vector and matrix tests were not conditionalized; add the #+int64 conditionals.
-
- May 08, 2009
-
-
Liam Healy authored
Print random number generator instances with type. Don't assume that :slug is in the argument list of a defmcallback; make declare ignore form only if it's there. Update docstring for +taus2+. Continued development of the simulated annealing renovation.
-
- May 06, 2009
-
-
Liam Healy authored
Methods for symmetric-rank-2-update complex types added in blas3.
-
- May 04, 2009
-
-
Liam Healy authored
Simulated annealing uses a structure called by value; this has been ported to FSBV. Callbacks still need to be ported.
-
- May 03, 2009
-
-
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.
-
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.
-
Liam Healy authored
More accurate description of how to use FSBV; better organization of the download/install section.
-
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.
-
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.
-
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.
-
- Apr 30, 2009
-
-
Liam Healy authored
Method lisp-unit:numerical-equal on marrays always returned T; now fixed.
-
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.
-
- Apr 28, 2009
-
-
Liam Healy authored
Also cdot, solve-quadratic-complex, solve-cubic-complex generate complex scalars in the argument returned by reference.
-
- Apr 27, 2009
-
-
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.
-
- Apr 26, 2009
-
-
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.
-
- Apr 20, 2009
-
-
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.
-
- Apr 16, 2009
-
-
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.
-
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.
-
- Apr 12, 2009
-
-
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.
-
- Apr 05, 2009
-
-
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.
-
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.
-
- Apr 04, 2009
-
-
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.
-
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.
-
- Apr 03, 2009
-
-
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.
-
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.
-
- Apr 02, 2009
-
-
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.
-
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.
-
- Apr 01, 2009
-
-
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'
-