You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/07/31 21:47:25 UTC
[commons-rng] 07/08: RNG-110: Fix javadoc and formatting.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
commit 57ac9f078a43ef062f2a4faa6a78462f8ed42e05
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Jul 30 21:13:34 2019 +0100
RNG-110: Fix javadoc and formatting.
---
.../sampling/distribution/AhrensDieterExponentialSampler.java | 2 +-
.../distribution/AhrensDieterMarsagliaTsangGammaSampler.java | 8 ++++----
.../rng/sampling/distribution/BoxMullerLogNormalSampler.java | 2 +-
.../commons/rng/sampling/distribution/GeometricSampler.java | 10 +++++-----
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java
index e8ad681..b6d23d3 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java
@@ -143,7 +143,7 @@ public class AhrensDieterExponentialSampler
}
/**
- * Create a new Exponential distribution sampler.
+ * Create a new exponential distribution sampler.
*
* @param rng Generator of uniformly distributed random numbers.
* @param mean Mean of the distribution.
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSampler.java
index db52483..dc565f0 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSampler.java
@@ -19,7 +19,7 @@ package org.apache.commons.rng.sampling.distribution;
import org.apache.commons.rng.UniformRandomProvider;
/**
- * Sampling from the <a href="http://mathworld.wolfram.com/GammaDistribution.html">Gamma distribution</a>.
+ * Sampling from the <a href="http://mathworld.wolfram.com/GammaDistribution.html">gamma distribution</a>.
* <ul>
* <li>
* For {@code 0 < alpha < 1}:
@@ -303,7 +303,7 @@ public class AhrensDieterMarsagliaTsangGammaSampler
}
/**
- * Creates a new Gamma distribution sampler.
+ * Creates a new gamma distribution sampler.
*
* @param rng Generator of uniformly distributed random numbers.
* @param alpha Alpha parameter of the distribution (this is a shape parameter).
@@ -312,8 +312,8 @@ public class AhrensDieterMarsagliaTsangGammaSampler
* @throws IllegalArgumentException if {@code alpha <= 0} or {@code theta <= 0}
*/
public static SharedStateContinuousSampler of(UniformRandomProvider rng,
- double alpha,
- double theta) {
+ double alpha,
+ double theta) {
// Each sampler should check the input arguments.
return alpha < 1 ?
new AhrensDieterGammaSampler(rng, alpha, theta) :
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSampler.java
index d4177d1..dae2155 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSampler.java
@@ -47,7 +47,7 @@ public class BoxMullerLogNormalSampler
double shape) {
super(null);
sampler = LogNormalSampler.of(BoxMullerNormalizedGaussianSampler.of(rng),
- scale, shape);
+ scale, shape);
}
/** {@inheritDoc} */
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/GeometricSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/GeometricSampler.java
index a3f3339..e701e72 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/GeometricSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/GeometricSampler.java
@@ -133,15 +133,15 @@ public final class GeometricSampler {
private GeometricSampler() {}
/**
- * Creates a new geometric distribution sampler. The samples will be provided in
- * the set {@code k=[0, 1, 2, ...]} where {@code k} indicates the number of
- * failures before the first success.
+ * Creates a new geometric distribution sampler. The samples will be provided in the set
+ * {@code k=[0, 1, 2, ...]} where {@code k} indicates the number of failures before the first
+ * success.
*
* @param rng Generator of uniformly distributed random numbers.
* @param probabilityOfSuccess The probability of success.
* @return the sampler
- * @throws IllegalArgumentException if {@code probabilityOfSuccess} is not in
- * the range {@code [0 < probabilityOfSuccess <= 1]})
+ * @throws IllegalArgumentException if {@code probabilityOfSuccess} is not in the range
+ * {@code [0 < probabilityOfSuccess <= 1]})
*/
public static SharedStateDiscreteSampler of(UniformRandomProvider rng,
double probabilityOfSuccess) {