aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-11Remove unnecessary whitespace.Arun Isaac
* src/nd-random.sc (solid-angle->planar-angle): Remove unnecessary whitespace at the beginning of the line.
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-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-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-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.
2021-02-05Declare infinity_norm as static.Arun Isaac
* src/oracles.c (infinity_norm): Declare as static.
2021-02-05Remove unused geometric progression functions.Arun Isaac
* include/utils.h (gprate, gpterm): Delete function prototype declarations. * src/utils.c (gprate, gpterm): Delete functions.
2021-02-05Remove unused extent oracles.Arun Isaac
* include/oracles.c (symmetric_spiral_extent_oracle, right_triangle_extent_oracle, right_triangle_true_volume, sphere_extent_oracle, sphere_maximum_extent, plane_extent_oracle): Delete function prototype declarations. * src/oracles.c (symmetric_spiral_extent_oracle, right_triangle_extent_oracle, right_triangle_true_volume, sphere_extent_oracle, sphere_maximum_extent, plane_extent_oracle): Delete functions.
2021-02-03Move source files and headers to separate directories.Arun Isaac
* extent-sampling.h, gaussian-nd-random.h, nd-random.h, oracles.h, utils.h: Move into include directory. * extent-sampling.c, gaussian-nd-random.c, nd-random.c, oracles.c, utils.c: Move into src directory. * CMakeLists.txt: Set include as include directory. Look for source files inside src directory.