List of usage examples for org.apache.commons.math3.exception.util LocalizedFormats LOWER_BOUND_NOT_BELOW_UPPER_BOUND
LocalizedFormats LOWER_BOUND_NOT_BELOW_UPPER_BOUND
To view the source code for org.apache.commons.math3.exception.util LocalizedFormats LOWER_BOUND_NOT_BELOW_UPPER_BOUND.
Click Source Link
From source file:org.deeplearning4j.nn.conf.distribution.UniformDistribution.java
/** * Create a uniform real distribution using the given lower and upper * bounds.//w w w . java 2 s . com * * @param lower Lower bound of this distribution (inclusive). * @param upper Upper bound of this distribution (exclusive). * @throws NumberIsTooLargeException if {@code lower >= upper}. */ @JsonCreator public UniformDistribution(@JsonProperty("lower") double lower, @JsonProperty("upper") double upper) throws NumberIsTooLargeException { if (lower >= upper) { throw new NumberIsTooLargeException(LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, lower, upper, false); } this.lower = lower; this.upper = upper; }
From source file:org.nd4j.linalg.api.rng.distribution.impl.UniformDistribution.java
/** * Creates a uniform distribution./*w w w . j a v a 2 s . c o m*/ * * @param rng Random number generator. * @param lower Lower bound of this distribution (inclusive). * @param upper Upper bound of this distribution (exclusive). * @throws NumberIsTooLargeException if {@code lower >= upper}. * @since 3.1 */ public UniformDistribution(org.nd4j.linalg.api.rng.Random rng, double lower, double upper) throws NumberIsTooLargeException { super(rng); if (lower >= upper) { throw new NumberIsTooLargeException(LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, lower, upper, false); } this.lower = lower; this.upper = upper; }