aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-02-26Add copyright and license headers for all files.Arun Isaac
* include/extent-sampling.h, include/gaussian-nd-random.h, include/integrands.h, include/nd-random.h, include/oracles.h, include/utils.h, src/extent-sampling.sc, src/gaussian-nd-random.sc, src/integrands.sc, src/macros/macros.sc, src/nd-random.sc, src/oracles.sc, src/utils.sc, CMakeLists.txt, pre-inst-env.in: Add copyright and license headers.
2021-02-26Add a copy of the GPLv3.Arun Isaac
* COPYING: New file.
2021-02-26Add explicit citation information in README.Arun Isaac
* README.org (Citing): New section.
2021-02-26Refer to papers in the opening of the README.Arun Isaac
* README.org: Refer to papers at the opening.
2021-02-26Change title of README.Arun Isaac
* README.org (TITLE): Set to "n-sphere Monte Carlo Method".
2021-02-26Document running of examples in README.Arun Isaac
* README.org (Usage): New section.
2021-02-26Add hollow cone vector generation example.Arun Isaac
* examples/generate-hollow-cone-vector.c: New file.
2021-02-26Add cone vector generation example.Arun Isaac
* examples/generate-cone-vector.c: New file.
2021-02-26Set CPATH and LIBRARY_PATH in pre-inst-env wrapper.Arun Isaac
This is so that someone compiling and running C programs against libnsmc can do so easily. * pre-inst-env.in: Set CPATH and LIBRARY_PATH.
2021-02-26Rename subsampling-random-vector to cone-random-vector.Arun Isaac
* scm/nsmc/wrap.scm: (subsampling-random-vector): Rename to cone-random-vector. * src/nd-random.sc (subsampling-random-vector): Rename to cone-random-vector. * include/nd-random.h (subsampling_random_vector): Rename to cone_random_vector.
2021-02-26Rename project to nsmc.Arun Isaac
2021-02-26Advertise guix environment in README.Arun Isaac
* README.org (Build): Advertise guix environment.
2021-02-26Link to dependencies in README.Arun Isaac
* README.org (Build): Link to dependencies.
2021-02-26Specify GSL as a dependency in README.Arun Isaac
* README.org (Build): Specify GSL as a dependency.
2021-02-26Add indent to build dependencies.Arun Isaac
* guix.scm (extent-sampling): Add indent to native-inputs.
2021-02-26Fix home-page in guix.scm.Arun Isaac
* guix.scm (extent-sampling): Fix home-page.
2021-02-26Add README.Arun Isaac
* README.org: New file.
2021-02-26Comment about building and installing shared library.Arun Isaac
* CMakeLists.txt: Comment about building and installing shared library.
2021-02-26Include GNUInstallDirs earlier in CMakeLists.Arun Isaac
* CMakeLists.txt: Include GNUInstallDirs earlier.
2021-02-26Wrap volume-window function.Arun Isaac
* scm/extent-sampling/wrap.scm (volume-window): New function.
2021-02-26Remove unused neval variable.Arun Isaac
* src/extent-sampling.sc (integral-per-direction): Remove neval from function arguments. (integral): Adjust integral-per-direction function call.
2021-02-24Remove workaround for sph-sc negation bug.Arun Isaac
The bug has been fixed upstream. * src/integrands.sc (gaussian-integrand): Remove workaround for sph-sc negation bug.
2021-02-23Wrap integral function.Arun Isaac
* scm/extent-sampling/wrap.scm (maybe-procedure->integrand, integral): New functions.
2021-02-23Wrap volume function.Arun Isaac
* scm/extent-sampling/wrap.scm (maybe-procedure->extent-oracle, maybe-procedure->integrand): New functions.
2021-02-23Wrap integrands.Arun Isaac
* scm/extent-sampling/wrap.scm (make-integrand, make-polynomial-integrand, gaussian-integrand, x-coordinate-integrand): New functions.
2021-02-23Wrap extent oracles.Arun Isaac
* scm/extent-sampling/wrap.scm (make-extent-oracle, make-bernoulli-params, make-bernoulli-oracle, true-volume-procedure, bernoulli-true-volume, make-uniform-params, make-uniform-oracle, uniform-true-volume, make-beta-params, make-beta-oracle, beta-true-volume, make-cube-params, make-cube-oracle, cube-true-volume, make-spheroid-params, make-spheroid-oracle, spheroid-true-volume): New functions.
2021-02-23Implement the lower incomplete gamma function as a scheme wrapper.Arun Isaac
With this change, the wrapper around the gsl lower incomplete gamma function is directly in scheme. Earlier, there was one layer of wrapping in C which needed to be wrapped again in scheme. * include/utils.h (lower_incomplete_gamma): Delete function. * src/utils.sc (lower-incomplete-gamma): Delete function. * scm/extent-sampling/wrap.scm (lower-incomplete-gamma): New function.
2021-02-23Provide test integrals.Arun Isaac
* include/integrands.h, src/integrands.sc: New files.
2021-02-23Redefine integrand_t as a struct.Arun Isaac
This change will make it easier for the scheme wrapper to curry integrands. * include/extent-sampling.h (integrand_t): Redefine type as struct. (integral): Pass pointer to integrand_t. * src/extent-sampling.sc (integral-per-direction, integral): Handle new integrand-t type. (invoke-integrand): New sc macro.
2021-02-23Implement uniform-true-volume without log.Arun Isaac
Logarithmic functions trip up when their parameter is 0. * src/oracles.sc (uniform-true-volume): Implement without log.
2021-02-23Rename function scope params argument to avoid name conflict.Arun Isaac
* src/oracles.sc (bernoulli-extent-oracle, bernoulli-true-volume, uniform-extent-oracle, uniform-true-volume, beta-extent-oracle, beta-true-volume, cube-extent-oracle, cube-extent-oracle-with-center, cube-true-volume, ellipsoid-extent-oracle, ellipsoid-true-volume, spheroid-extent-oracle, spheroid-true-volume): Rename params argument to -params.
2021-02-23Wrap gsl polynomial evaluation function.Arun Isaac
* scm/extent-sampling/wrap.scm (polyval): New function.
2021-02-23Wrap gsl rstat functions.Arun Isaac
* scm/extent-sampling/wrap.scm (rstat-alloc, rstat-n): New functions.
2021-02-11Pass extent-oracle-t as pointer.Arun Isaac
* include/extent-sampling.h (volume, volume_window, integral, volume_cone, volume_experiment): Pass extent_oracle_t as pointer. * src/extent-sampling.sc: Likewise.
2021-02-11Change extent oracle and true volume prototypes.Arun Isaac
This change will make it easier for the scheme wrapper to curry extent oracles. * include/extent-sampling.h (extent_oracle_t): Define as a struct that bundles the parameters required by the actual extent oracle. * include/oracles.h (bernoulli_params, uniform_params, beta_params, cube_params, ellipsoid_params, spheroid_params): New types. (bernoulli_extent_generator, uniform_extent_generator, beta_extent_generator): Rename to bernoulli_extent_oracle, uniform_extent_oracle, beta_extent_oracle respectively and change to the new extent oracle prototype. (bernoulli_true_volume, uniform_true_volume, beta_true_volume, cube_extent_oracle, cube_extent_oracle_with_center, cube_true_volume, ellipsoid_extent_oracle, ellipsoid_true_volume, spheroid_extent_oracle, spheroid_true_volume): Change to new extent oracle and true volume prototypes. * src/oracles.sc: Likewise. * src/extent-sampling.sc (invoke-extent-oracle): New macro. (volume, volume-window, integral, volume-cone): Call using new extent oracle prototype.
2021-02-11Include gsl_vector.h instead of gsl_blas.h.Arun Isaac
* include/oracles.h: Include gsl_vector.h instead of gsl_blas.h.
2021-02-11Remove unnecessary whitespace.Arun Isaac
* src/nd-random.sc (solid-angle->planar-angle): Remove unnecessary whitespace at the beginning of the line.
2021-02-11Link libextentsampling with libgsl and libgslcblas.Arun Isaac
* CMakeLists.txt: Link libextentsampling with libgsl and libgslcblas.
2021-02-11Remove cube maximum extent function.Arun Isaac
We are not using maximum extent functions anymore. * src/oracles.sc (cube-maximum-extent): Delete function. * include/oracles.h (cube-maximum-extent): Delete function declaration.
2021-02-10Remove unnecessary solver type variable.Arun Isaac
* src/utils.sc (with-root-fsolver): Rewrite without a temporary solver type variable.
2021-02-10Fix collision between solver type and solver type variable.Arun Isaac
* src/utils.sc (with-root-fsolver): Fix collision between solver type and solver type variable.
2021-02-10Add guix.scm.Arun Isaac
* guix.scm: New file.
2021-02-10Declare planar, solid angle conversion functions as public.Arun Isaac
* src/nd-random.sc (planar-angle->solid-angle, solid-angle->planar-angle): Declare these to be a part of the public interface of the module.
2021-02-10Add pre-installation environment script.Arun Isaac
The pre-inst-env script is required to find freshly built libraries and scheme files before installation. * pre-inst-env.in: New file. * CMakeLists.txt: Configure pre-inst-env.in with correct paths.
2021-02-10Add scheme wrapper.Arun Isaac
* scm/extent-sampling/load-libs.scm.in, scm/extent-sampling/wrap.scm: New files. * CMakeLists.txt: Check for guile. Build and install scheme wrapper. (change_extension): New function.
2021-02-09Install headers and shared library.Arun Isaac
* CMakeLists.txt: Install headers and shared library.
2021-02-09Make indentation of generated C sources optional.Arun Isaac
This is so as to not make indent a build dependency. * CMakeLists.txt: Indent generated C sources only when the indent program is found. Don't fail when indent is not found.
2021-02-05Use let* instead of declare and set.Arun Isaac
* src/macros/macros.sc (with-alloc): Use let* instead of declare and set.
2021-02-05Replace underscores in identifiers with hyphens.Arun Isaac
* src/utils.sc (angle-between-vectors, gaussian-cdf, bisection, bisection-rlimit): Replace underscores in identifiers with hyphens.
2021-02-05Specify dependency on src/macros/macros.sc.Arun Isaac
Not all SC files need depend on src/macros/macros.sc, but we make this simplifying assumption so as to not have to scan the source files at build time. * CMakeLists.txt: Make every SC file depend on src/macros/macros.sc.