diff options
author | Arun Isaac | 2021-03-26 14:09:53 +0530 |
---|---|---|
committer | Arun Isaac | 2021-03-26 14:09:53 +0530 |
commit | 229a88c4a9c70b26b35cc22b75576f26d49bb19d (patch) | |
tree | 227f9a387285bf7512f01692650aa4ac68f5dd69 | |
parent | e502db575fe706fc2d987807bacacc430114a171 (diff) | |
download | sambal-229a88c4a9c70b26b35cc22b75576f26d49bb19d.tar.gz sambal-229a88c4a9c70b26b35cc22b75576f26d49bb19d.tar.lz sambal-229a88c4a9c70b26b35cc22b75576f26d49bb19d.zip |
Rename random_vector_on_disk to random_on_disk.
* src/sambal/sambal.py (random_vector_on_disk): Rename to
random_on_disk.
(random_vector_on_spherical_cap_cdf,
random_vector_on_spherical_cap_pdf): Call random_on_disk instead of
random_vector_on_disk.
-rw-r--r-- | src/sambal/sambal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sambal/sambal.py b/src/sambal/sambal.py index fbb2025..de68d1c 100644 --- a/src/sambal/sambal.py +++ b/src/sambal/sambal.py @@ -73,7 +73,7 @@ def random_planar_angle_pdf(maximum_planar_angle, dim): if f < (dim-2)*log(sin(theta)): return theta -def random_vector_on_disk(axis, planar_angle): +def random_on_disk(axis, planar_angle): """Return a random vector uniformly distributed on the periphery of a disk.""" dim = axis.size @@ -86,7 +86,7 @@ def random_vector_on_spherical_cap_cdf(axis, maximum_planar_angle): """Return a random vector uniformly distributed on a spherical cap. The random planar angle is generated using inverse transform sampling.""" - return random_vector_on_disk(axis, random_planar_angle_cdf(maximum_planar_angle, axis.size)) + return random_on_disk(axis, random_planar_angle_cdf(maximum_planar_angle, axis.size)) def random_vector_on_spherical_cap_pdf(axis, maximum_planar_angle): """Return a random vector uniformly distributed on a spherical @@ -97,4 +97,4 @@ random_vector_on_spherical_cap_cdf for large dimensions and small angles. """ - return random_vector_on_disk(axis, random_planar_angle_pdf(maximum_planar_angle, axis.size)) + return random_on_disk(axis, random_planar_angle_pdf(maximum_planar_angle, axis.size)) |