Java Code Examples for org.apache.commons.math.exception.util.LocalizedFormats#SHAPE

The following examples show how to use org.apache.commons.math.exception.util.LocalizedFormats#SHAPE . 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: WeibullDistributionImpl.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a Weibull distribution with the given shape, scale and inverse
 * cumulative probability accuracy and a location equal to zero.
 *
 * @param alpha Shape parameter.
 * @param beta Scale parameter.
 * @param inverseCumAccuracy Maximum absolute error in inverse
 * cumulative probability estimates
 * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}).
 * @throws NotStrictlyPositiveException if {@code alpha <= 0} or
 * {@code beta <= 0}.
 * @since 2.1
 */
public WeibullDistributionImpl(double alpha, double beta,
                               double inverseCumAccuracy) {
    if (alpha <= 0) {
        throw new NotStrictlyPositiveException(LocalizedFormats.SHAPE,
                                               alpha);
    }
    if (beta <= 0) {
        throw new NotStrictlyPositiveException(LocalizedFormats.SCALE,
                                               beta);
    }
    scale = beta;
    shape = alpha;
    solverAbsoluteAccuracy = inverseCumAccuracy;
}
 
Example 2
Source File: WeibullDistributionImpl.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a Weibull distribution with the given shape, scale and inverse
 * cumulative probability accuracy and a location equal to zero.
 *
 * @param alpha Shape parameter.
 * @param beta Scale parameter.
 * @param inverseCumAccuracy Maximum absolute error in inverse
 * cumulative probability estimates
 * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}).
 * @throws NotStrictlyPositiveException if {@code alpha <= 0} or
 * {@code beta <= 0}.
 * @since 2.1
 */
public WeibullDistributionImpl(double alpha, double beta,
                               double inverseCumAccuracy) {
    if (alpha <= 0) {
        throw new NotStrictlyPositiveException(LocalizedFormats.SHAPE,
                                               alpha);
    }
    if (beta <= 0) {
        throw new NotStrictlyPositiveException(LocalizedFormats.SCALE,
                                               beta);
    }
    scale = beta;
    shape = alpha;
    solverAbsoluteAccuracy = inverseCumAccuracy;
}
 
Example 3
Source File: WeibullDistributionImpl.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a Weibull distribution with the given shape, scale and inverse
 * cumulative probability accuracy and a location equal to zero.
 *
 * @param alpha Shape parameter.
 * @param beta Scale parameter.
 * @param inverseCumAccuracy Maximum absolute error in inverse
 * cumulative probability estimates
 * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}).
 * @throws NotStrictlyPositiveException if {@code alpha <= 0} or
 * {@code beta <= 0}.
 * @since 2.1
 */
public WeibullDistributionImpl(double alpha, double beta,
                               double inverseCumAccuracy) {
    if (alpha <= 0) {
        throw new NotStrictlyPositiveException(LocalizedFormats.SHAPE,
                                               alpha);
    }
    if (beta <= 0) {
        throw new NotStrictlyPositiveException(LocalizedFormats.SCALE,
                                               beta);
    }
    scale = beta;
    shape = alpha;
    solverAbsoluteAccuracy = inverseCumAccuracy;
}