Java Code Examples for org.apache.commons.math3.distribution.UniformRealDistribution#DEFAULT_INVERSE_ABSOLUTE_ACCURACY

The following examples show how to use org.apache.commons.math3.distribution.UniformRealDistribution#DEFAULT_INVERSE_ABSOLUTE_ACCURACY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 2
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 3
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 4
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 5
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 6
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 7
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 8
Source File: RandomCirclePointGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param x Abscissa of the circle center.
 * @param y Ordinate of the circle center.
 * @param radius Radius of the circle.
 * @param xSigma Error on the x-coordinate of the circumference points.
 * @param ySigma Error on the y-coordinate of the circumference points.
 * @param seed RNG seed.
 */
public RandomCirclePointGenerator(double x,
                                  double y,
                                  double radius,
                                  double xSigma,
                                  double ySigma,
                                  long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    this.radius = radius;
    cX = new NormalDistribution(rng, x, xSigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    cY = new NormalDistribution(rng, y, ySigma,
                                NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
                                     UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 9
Source File: EmpiricalDistributionTest.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected RealDistribution getKernel(SummaryStatistics bStats) {
    return new UniformRealDistribution(randomData.getRandomGenerator(), bStats.getMin(), bStats.getMax(),
            UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 10
Source File: EmpiricalDistributionTest.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected RealDistribution getKernel(SummaryStatistics bStats) {
    return new UniformRealDistribution(randomData.getRandomGenerator(), bStats.getMin(), bStats.getMax(),
            UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 11
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 12
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 13
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 14
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 15
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 16
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 17
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 18
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 19
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}
 
Example 20
Source File: RandomStraightLinePointGenerator.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The generator will create a cloud of points whose x-coordinates
 * will be randomly sampled between {@code xLo} and {@code xHi}, and
 * the corresponding y-coordinates will be computed as
 * <pre><code>
 *  y = a x + b + N(0, error)
 * </code></pre>
 * where {@code N(mean, sigma)} is a Gaussian distribution with the
 * given mean and standard deviation.
 *
 * @param a Slope.
 * @param b Intercept.
 * @param sigma Standard deviation on the y-coordinate of the point.
 * @param lo Lowest value of the x-coordinate.
 * @param hi Highest value of the x-coordinate.
 * @param seed RNG seed.
 */
public RandomStraightLinePointGenerator(double a,
                                        double b,
                                        double sigma,
                                        double lo,
                                        double hi,
                                        long seed) {
    final RandomGenerator rng = new Well44497b(seed);
    slope = a;
    intercept = b;
    error = new NormalDistribution(rng, 0, sigma,
                                   NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
    x = new UniformRealDistribution(rng, lo, hi,
                                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}