Java Code Examples for org.apache.commons.math3.exception.util.LocalizedFormats#DIMENSION
The following examples show how to use
org.apache.commons.math3.exception.util.LocalizedFormats#DIMENSION .
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: ZipfDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 2
Source File: ZipfDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 3
Source File: ZipfDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 4
Source File: ZipfDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 5
Source File: ZipfDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 6
Source File: ZipfDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 7
Source File: ZipfDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 8
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }
Example 9
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }
Example 10
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }
Example 11
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }
Example 12
Source File: ZipfDistribution.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new Zipf distribution with the given number of elements and * exponent. * * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. */ public ZipfDistribution(final int numberOfElements, final double exponent) throws NotStrictlyPositiveException { if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; }
Example 13
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }
Example 14
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }
Example 15
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }
Example 16
Source File: AbstractFieldMatrix.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a new FieldMatrix<T> with the supplied row and column dimensions. * * @param field Field to which the elements belong. * @param rowDimension Number of rows in the new matrix. * @param columnDimension Number of columns in the new matrix. * @throws NotStrictlyPositiveException if row or column dimension is not * positive. */ protected AbstractFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException { if (rowDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, rowDimension); } if (columnDimension <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, columnDimension); } this.field = field; }