tabs -> spaces. No functional change
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992191 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfe4623c65
commit
0cb5c9ae58
|
@ -79,9 +79,9 @@ public abstract class AbstractUnivariateStatistic
|
|||
final double[] values,
|
||||
final int begin,
|
||||
final int length) {
|
||||
return test(values, begin, length, false);
|
||||
return test(values, begin, length, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is used by <code>evaluate(double[], int, int)</code> methods
|
||||
* to verify that the input parameters designate a subarray of positive length.
|
||||
|
@ -105,28 +105,28 @@ public abstract class AbstractUnivariateStatistic
|
|||
*/
|
||||
protected boolean test(final double[] values, final int begin, final int length, final boolean allowEmpty){
|
||||
|
||||
if (values == null) {
|
||||
throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
|
||||
}
|
||||
if (values == null) {
|
||||
throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
|
||||
}
|
||||
|
||||
if (begin < 0) {
|
||||
throw new NotPositiveException(LocalizedFormats.START_POSITION, begin);
|
||||
}
|
||||
if (begin < 0) {
|
||||
throw new NotPositiveException(LocalizedFormats.START_POSITION, begin);
|
||||
}
|
||||
|
||||
if (length < 0) {
|
||||
throw new NotPositiveException(LocalizedFormats.LENGTH, length);
|
||||
}
|
||||
if (length < 0) {
|
||||
throw new NotPositiveException(LocalizedFormats.LENGTH, length);
|
||||
}
|
||||
|
||||
if (begin + length > values.length) {
|
||||
throw MathRuntimeException.createIllegalArgumentException(
|
||||
LocalizedFormats.SUBARRAY_ENDS_AFTER_ARRAY_END);
|
||||
}
|
||||
if (begin + length > values.length) {
|
||||
throw MathRuntimeException.createIllegalArgumentException(
|
||||
LocalizedFormats.SUBARRAY_ENDS_AFTER_ARRAY_END);
|
||||
}
|
||||
|
||||
if (length == 0 && !allowEmpty) {
|
||||
return false;
|
||||
}
|
||||
if (length == 0 && !allowEmpty) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -164,9 +164,9 @@ public abstract class AbstractUnivariateStatistic
|
|||
final double[] weights,
|
||||
final int begin,
|
||||
final int length) {
|
||||
return test(values, weights, begin, length, false);
|
||||
return test(values, weights, begin, length, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is used by <code>evaluate(double[], double[], int, int)</code> methods
|
||||
* to verify that the begin and length parameters designate a subarray of positive length
|
||||
|
@ -219,7 +219,7 @@ public abstract class AbstractUnivariateStatistic
|
|||
}
|
||||
if (weights[i] < 0) {
|
||||
throw MathRuntimeException.createIllegalArgumentException(
|
||||
LocalizedFormats.NEGATIVE_ELEMENT_AT_INDEX, i, weights[i]);
|
||||
LocalizedFormats.NEGATIVE_ELEMENT_AT_INDEX, i, weights[i]);
|
||||
}
|
||||
if (!containsPositiveWeight && weights[i] > 0.0) {
|
||||
containsPositiveWeight = true;
|
||||
|
|
|
@ -74,7 +74,7 @@ public abstract class StorelessUnivariateStatisticAbstractTest
|
|||
}
|
||||
|
||||
protected void checkClearValue(StorelessUnivariateStatistic statistic){
|
||||
assertTrue(Double.isNaN(statistic.getResult()));
|
||||
assertTrue(Double.isNaN(statistic.getResult()));
|
||||
}
|
||||
|
||||
public void testSerialization() throws Exception {
|
||||
|
|
|
@ -86,8 +86,8 @@ public class ProductTest extends StorelessUnivariateStatisticAbstractTest{
|
|||
}
|
||||
|
||||
protected void checkClearValue(StorelessUnivariateStatistic statistic){
|
||||
assertEquals(1, statistic.getResult(), 0);
|
||||
assertEquals(1, statistic.getResult(), 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public class SumLogTest extends StorelessUnivariateStatisticAbstractTest{
|
|||
}
|
||||
|
||||
protected void checkClearValue(StorelessUnivariateStatistic statistic){
|
||||
assertEquals(0, statistic.getResult(), 0);
|
||||
assertEquals(0, statistic.getResult(), 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ public class SumSqTest extends StorelessUnivariateStatisticAbstractTest{
|
|||
}
|
||||
|
||||
protected void checkClearValue(StorelessUnivariateStatistic statistic){
|
||||
assertEquals(0, statistic.getResult(), 0);
|
||||
assertEquals(0, statistic.getResult(), 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -76,8 +76,8 @@ public class SumTest extends StorelessUnivariateStatisticAbstractTest{
|
|||
}
|
||||
|
||||
protected void checkClearValue(StorelessUnivariateStatistic statistic){
|
||||
assertEquals(0, statistic.getResult(), 0);
|
||||
assertEquals(0, statistic.getResult(), 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue