Age | Commit message (Collapse) | Author |
|
We are already passing in the true volume or integral, and checking
that the estimate is within the required tolerance. What is the point
in returning the estimate to the caller.
* include/extent-sampling.h (volume, integral): Return nothing.
* src/extent-sampling.sc (volume, integral): Return nothing.
* scm/nsmc/wrap.scm (volume, integral): Accept no return value from C
function.
|
|
* include/extent-sampling.h (volume_window): Delete function.
* src/extent-sampling.sc (integral, volume): Return the first accurate
estimate.
(volume-window): Delete function.
* scm/nsmc/wrap.scm (volume-window): Delete function.
|
|
* scm/nsmc/wrap.scm (volume-importance): New function.
|
|
* src/extent-sampling.sc,
include/extent-sampling.h (volume-experiment): Rename to
volume-importance.
|
|
* scm/nsmc/wrap.scm (log-gamma): New function.
|
|
* contrib/cone-vector.py (sample_code): Demonstrate cone sampling with
rejection sampling too.
|
|
* contrib/cone-vector.py: Import log.
(random_planar_angle_pdf, random_vector_on_spherical_cap_pdf): New
functions.
|
|
* contrib/cone-vector.py (random_planar_angle_cdf,
random_vector_on_disk): New functions.
(random_vector_on_spherical_cap): Rename to
random_vector_on_spherical_cap_cdf. Call random_planar_angle_cdf and
random_vector_on_disk.
(sample_code): Call random_vector_on_spherical_cap_cdf instead of
random_vector_on_spherical_cap.
|
|
* src/extent-sampling.sc (volume-cone): Use
solid-angle-fraction->planar-angle instead of
solid-angle->planar-angle.
* src/nd-random.sc (planar-angle->solid-angle): Rename to
planar-angle->solid-angle-fraction and return a solid angle fraction.
(solid-angle->planar-angle): Rename to
solid-angle-fraction->planar-angle and accept a solid angle fraction.
(hollow-cone-random-vector): Use planar-angle->solid-angle-fraction
instead of planar-angle->solid-angle.
(beta-inc-unnormalized, incomplete-wallis-integral): Delete functions.
* include/nd-random.h (planar_angle_to_solid_angle): Rename to
planar_angle_to_solid_angle_fraction.
(solid_angle_to_planar_angle): Rename to
solid_angle_fraction_to_planar_angle.
* scm/nsmc/wrap.scm (planar-angle->solid-angle): Rename to
planar-angle->solid-angle-fraction.
|
|
* src/nd-random.sc (rotate-from-nth-canonical): Do nothing when
vectors around the nth canonical axis are required.
|
|
* src/nd-random.sc (hollow-cone-random-vector): Implement simplified
algorithm that directly samples the surface of the sphere instead of
sampling a disk and projecting it onto the surface.
|
|
* contrib/cone-vector.py: Call sample_code when run as a script.
(sample_code): New function.
|
|
* contrib/cone-vector.py: Don't import zeros from numpy and gamma from
scipy.special.
|
|
* contrib/cone-vector.py (random_vector_on_sphere,
planar_angle2solid_angle_fraction, solid_angle_fraction2planar_angle,
rotate_from_nth_canonical, random_vector_on_spherical_cap): Add
docstrings.
|
|
* contrib/cone-vector.py (random_vector_on_sphere,
planar_angle2solid_angle_fraction, solid_angle_fraction2planar_angle,
rotate_from_nth_canonical, random_vector_on_spherical_cap): Remove
space between function name and bracket.
|
|
* contrib/cone-vector.py: Don't import tan.
(random_vector_on_spherical_cap): Implement simplified algorithm that
directly samples the surface of the sphere instead of sampling a disk
and projecting it onto the surface.
|
|
* contrib/cone-vector.py: Import where.
(planar_angle2solid_angle_fraction,
solid_angle_fraction2planar_angle): Vectorize functions.
|
|
* contrib/cone-vector.py (solid_angle_fraction2planar_angle): Fix for
solid_angle_fraction > 1/2.
|
|
* contrib/cone-vector.py: Import empty. Don't import concatenate.
(random_vector_on_spherical_cap): Build random vector without
concatenation.
|
|
Now that we are computing solid angle fractions, there is no need to
compute the total surface area of the sphere.
* contrib/cone-vector.py (surface_area_of_ball): Delete function.
(solid_angle_fraction2planar_angle): Remove surface area computation.
|
|
* contrib/cone-vector.py: New file.
|
|
* scm/nsmc/load-libs.scm.in, scm/nsmc/wrap.scm: Add copyright and
license headers.
|
|
* README.org: List papers as a bulleted list.
|
|
* guix.scm: Add guix environment instructions.
|
|
* 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.
|
|
* COPYING: New file.
|
|
* README.org (Citing): New section.
|
|
* README.org: Refer to papers at the opening.
|
|
* README.org (TITLE): Set to "n-sphere Monte Carlo Method".
|
|
* README.org (Usage): New section.
|
|
* examples/generate-hollow-cone-vector.c: New file.
|
|
* examples/generate-cone-vector.c: New file.
|
|
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.
|
|
* 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.
|
|
|
|
* README.org (Build): Advertise guix environment.
|
|
* README.org (Build): Link to dependencies.
|
|
* README.org (Build): Specify GSL as a dependency.
|
|
* guix.scm (extent-sampling): Add indent to native-inputs.
|
|
* guix.scm (extent-sampling): Fix home-page.
|
|
* README.org: New file.
|
|
* CMakeLists.txt: Comment about building and installing shared
library.
|
|
* CMakeLists.txt: Include GNUInstallDirs earlier.
|
|
* scm/extent-sampling/wrap.scm (volume-window): New function.
|
|
* src/extent-sampling.sc (integral-per-direction): Remove neval from
function arguments.
(integral): Adjust integral-per-direction function call.
|
|
The bug has been fixed upstream.
* src/integrands.sc (gaussian-integrand): Remove workaround for sph-sc
negation bug.
|
|
* scm/extent-sampling/wrap.scm (maybe-procedure->integrand, integral):
New functions.
|
|
* scm/extent-sampling/wrap.scm (maybe-procedure->extent-oracle,
maybe-procedure->integrand): New functions.
|
|
* scm/extent-sampling/wrap.scm (make-integrand,
make-polynomial-integrand, gaussian-integrand,
x-coordinate-integrand): New functions.
|
|
* 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.
|