aboutsummaryrefslogtreecommitdiff
path: root/src/oracles.sc
AgeCommit message (Collapse)Author
2021-06-30Add offcenter ellipsoid extent oracle.Arun Isaac
* src/oracles.sc: Include gsl/gsl_poly.h. (ellipsoid-extent-oracle-with-center): New function. * include/oracles.h (ellipsoid_params): Add center member. (ellipsoid_extent_oracle_with_center): Declare it.
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-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-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-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-05Migrate C source to SC.Arun Isaac
sph-sc is a scheme-like S-expression syntax for C. It elements much of the pain and repetition involved in writing C syntax. * src/extent-sampling.c, src/gaussian-nd-random.c, src/nd-random.c, src/oracles.c, src/utils.c: Delete files. * src/extent-sampling.sc, src/gaussian-nd-random.sc, src/macros/macros.sc, src/nd-random.sc, src/oracles.sc, src/utils.sc: New files. * CMakeLists.txt: Generate C source files from SC source files.