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:
William Barker 2010-09-03 03:46:53 +00:00
parent bfe4623c65
commit 0cb5c9ae58
6 changed files with 30 additions and 30 deletions

View File

@ -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;

View File

@ -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 {

View File

@ -86,8 +86,8 @@ public class ProductTest extends StorelessUnivariateStatisticAbstractTest{
}
protected void checkClearValue(StorelessUnivariateStatistic statistic){
assertEquals(1, statistic.getResult(), 0);
assertEquals(1, statistic.getResult(), 0);
}
}

View File

@ -82,7 +82,7 @@ public class SumLogTest extends StorelessUnivariateStatisticAbstractTest{
}
protected void checkClearValue(StorelessUnivariateStatistic statistic){
assertEquals(0, statistic.getResult(), 0);
assertEquals(0, statistic.getResult(), 0);
}

View File

@ -68,8 +68,8 @@ public class SumSqTest extends StorelessUnivariateStatisticAbstractTest{
}
protected void checkClearValue(StorelessUnivariateStatistic statistic){
assertEquals(0, statistic.getResult(), 0);
assertEquals(0, statistic.getResult(), 0);
}
}

View File

@ -76,8 +76,8 @@ public class SumTest extends StorelessUnivariateStatisticAbstractTest{
}
protected void checkClearValue(StorelessUnivariateStatistic statistic){
assertEquals(0, statistic.getResult(), 0);
assertEquals(0, statistic.getResult(), 0);
}
}