Tidy throws clauses
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1197481 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
76a6378464
commit
2a2a74e9d5
|
@ -18,7 +18,6 @@ package org.apache.commons.math.analysis.integration;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.analysis.QuinticFunction;
|
||||
import org.apache.commons.math.analysis.SinFunction;
|
||||
import org.apache.commons.math.analysis.UnivariateRealFunction;
|
||||
|
@ -32,7 +31,7 @@ import org.junit.Test;
|
|||
public class LegendreGaussIntegratorTest {
|
||||
|
||||
@Test
|
||||
public void testSinFunction() throws MathException {
|
||||
public void testSinFunction() {
|
||||
UnivariateRealFunction f = new SinFunction();
|
||||
UnivariateRealIntegratorImpl integrator = new LegendreGaussIntegrator(5, 1.0e-14, 1.0e-10, 2, 15);
|
||||
double min, max, expected, result, tolerance;
|
||||
|
@ -51,7 +50,7 @@ public class LegendreGaussIntegratorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testQuinticFunction() throws MathException {
|
||||
public void testQuinticFunction() {
|
||||
UnivariateRealFunction f = new QuinticFunction();
|
||||
UnivariateRealIntegrator integrator =
|
||||
new LegendreGaussIntegrator(3,
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis.integration;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.analysis.QuinticFunction;
|
||||
import org.apache.commons.math.analysis.SinFunction;
|
||||
import org.apache.commons.math.analysis.UnivariateRealFunction;
|
||||
|
@ -42,7 +41,7 @@ public final class RombergIntegratorTest {
|
|||
* Test of integrator for the sine function.
|
||||
*/
|
||||
@Test
|
||||
public void testSinFunction() throws MathException {
|
||||
public void testSinFunction() {
|
||||
UnivariateRealFunction f = new SinFunction();
|
||||
UnivariateRealIntegrator integrator = new RombergIntegrator();
|
||||
double min, max, expected, result, tolerance;
|
||||
|
@ -66,7 +65,7 @@ public final class RombergIntegratorTest {
|
|||
* Test of integrator for the quintic function.
|
||||
*/
|
||||
@Test
|
||||
public void testQuinticFunction() throws MathException {
|
||||
public void testQuinticFunction() {
|
||||
UnivariateRealFunction f = new QuinticFunction();
|
||||
UnivariateRealIntegrator integrator = new RombergIntegrator();
|
||||
double min, max, expected, result, tolerance;
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis.integration;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.analysis.QuinticFunction;
|
||||
import org.apache.commons.math.analysis.SinFunction;
|
||||
import org.apache.commons.math.analysis.UnivariateRealFunction;
|
||||
|
@ -41,7 +40,7 @@ public final class SimpsonIntegratorTest {
|
|||
* Test of integrator for the sine function.
|
||||
*/
|
||||
@Test
|
||||
public void testSinFunction() throws MathException {
|
||||
public void testSinFunction() {
|
||||
UnivariateRealFunction f = new SinFunction();
|
||||
UnivariateRealIntegrator integrator = new SimpsonIntegrator();
|
||||
double min, max, expected, result, tolerance;
|
||||
|
@ -65,7 +64,7 @@ public final class SimpsonIntegratorTest {
|
|||
* Test of integrator for the quintic function.
|
||||
*/
|
||||
@Test
|
||||
public void testQuinticFunction() throws MathException {
|
||||
public void testQuinticFunction() {
|
||||
UnivariateRealFunction f = new QuinticFunction();
|
||||
UnivariateRealIntegrator integrator = new SimpsonIntegrator();
|
||||
double min, max, expected, result, tolerance;
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.apache.commons.math.analysis.integration;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.analysis.QuinticFunction;
|
||||
import org.apache.commons.math.analysis.SinFunction;
|
||||
import org.apache.commons.math.analysis.UnivariateRealFunction;
|
||||
|
@ -41,7 +40,7 @@ public final class TrapezoidIntegratorTest {
|
|||
* Test of integrator for the sine function.
|
||||
*/
|
||||
@Test
|
||||
public void testSinFunction() throws MathException {
|
||||
public void testSinFunction() {
|
||||
UnivariateRealFunction f = new SinFunction();
|
||||
UnivariateRealIntegrator integrator = new TrapezoidIntegrator();
|
||||
double min, max, expected, result, tolerance;
|
||||
|
@ -65,7 +64,7 @@ public final class TrapezoidIntegratorTest {
|
|||
* Test of integrator for the quintic function.
|
||||
*/
|
||||
@Test
|
||||
public void testQuinticFunction() throws MathException {
|
||||
public void testQuinticFunction() {
|
||||
UnivariateRealFunction f = new QuinticFunction();
|
||||
UnivariateRealIntegrator integrator = new TrapezoidIntegrator();
|
||||
double min, max, expected, result, tolerance;
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
*/
|
||||
package org.apache.commons.math.distribution;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class BetaDistributionTest {
|
||||
@Test
|
||||
public void testCumulative() throws MathException {
|
||||
public void testCumulative() {
|
||||
double[] x = new double[]{-0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1};
|
||||
// all test data computed using R 2.5
|
||||
checkCumulative(0.1, 0.1,
|
||||
|
@ -141,7 +140,7 @@ public class BetaDistributionTest {
|
|||
|
||||
}
|
||||
|
||||
private void checkCumulative(double alpha, double beta, double[] x, double[] cumes) throws MathException {
|
||||
private void checkCumulative(double alpha, double beta, double[] x, double[] cumes) {
|
||||
BetaDistribution d = new BetaDistributionImpl(alpha, beta);
|
||||
for (int i = 0; i < x.length; i++) {
|
||||
Assert.assertEquals(cumes[i], d.cumulativeProbability(x[i]), 1e-8);
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
package org.apache.commons.math.distribution;
|
||||
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.exception.NotStrictlyPositiveException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -180,7 +179,7 @@ public class NormalDistributionTest extends ContinuousDistributionAbstractTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMath280() throws MathException {
|
||||
public void testMath280() {
|
||||
NormalDistribution normal = new NormalDistributionImpl(0,1);
|
||||
double result = normal.inverseCumulativeProbability(0.9986501019683698);
|
||||
Assert.assertEquals(3.0, result, defaultTolerance);
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.apache.commons.math.distribution;
|
|||
import org.apache.commons.math.exception.NotStrictlyPositiveException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.TestUtils;
|
||||
/**
|
||||
* Test cases for TDistribution.
|
||||
|
@ -144,7 +143,7 @@ public class TDistributionTest extends ContinuousDistributionAbstractTest {
|
|||
* Have chosen problevels from 0.10 to 0.001
|
||||
*/
|
||||
@Test
|
||||
public void nistData() throws MathException{
|
||||
public void nistData(){
|
||||
double[] prob = new double[]{ 0.10,0.05,0.025,0.01,0.005,0.001};
|
||||
double[] args2 = new double[]{1.886,2.920,4.303,6.965,9.925,22.327};
|
||||
double[] args10 = new double[]{1.372,1.812,2.228,2.764,3.169,4.143};
|
||||
|
@ -156,7 +155,7 @@ public class TDistributionTest extends ContinuousDistributionAbstractTest {
|
|||
TestUtils.assertEquals(prob, makeNistResults(args100, 100), 1.0e-4);
|
||||
return;
|
||||
}
|
||||
private double[] makeNistResults(double[] args, int df) throws MathException{
|
||||
private double[] makeNistResults(double[] args, int df){
|
||||
TDistribution td = new TDistributionImpl(df);
|
||||
double[] res = new double[ args.length ];
|
||||
for( int i = 0 ; i < res.length ; i++){
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.commons.math.fraction;
|
|||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.commons.math.exception.MathParseException;
|
||||
|
@ -269,7 +268,7 @@ public class BigFractionFormatTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testParseBig() throws ParseException {
|
||||
public void testParseBig() {
|
||||
BigFraction f1 =
|
||||
improperFormat.parse("167213075789791382630275400487886041651764456874403" +
|
||||
" / " +
|
||||
|
|
|
@ -18,7 +18,6 @@ package org.apache.commons.math.stat.regression;
|
|||
|
||||
import org.apache.commons.math.linear.RealMatrix;
|
||||
import org.apache.commons.math.stat.correlation.PearsonsCorrelation;
|
||||
import org.apache.commons.math.MathException;
|
||||
import org.apache.commons.math.TestUtils;
|
||||
import org.apache.commons.math.util.FastMath;
|
||||
import org.junit.Test;
|
||||
|
@ -233,7 +232,7 @@ public class MillerUpdatingRegressionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFilippelli() throws MathException {
|
||||
public void testFilippelli() {
|
||||
double[] data = new double[]{
|
||||
0.8116, -6.860120914,
|
||||
0.9072, -4.324130045,
|
||||
|
@ -385,7 +384,7 @@ public class MillerUpdatingRegressionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWampler1() throws MathException {
|
||||
public void testWampler1() {
|
||||
double[] data = new double[]{
|
||||
1, 0,
|
||||
6, 1,
|
||||
|
@ -445,7 +444,7 @@ public class MillerUpdatingRegressionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWampler2() throws MathException {
|
||||
public void testWampler2() {
|
||||
double[] data = new double[]{
|
||||
1.00000, 0,
|
||||
1.11111, 1,
|
||||
|
@ -504,7 +503,7 @@ public class MillerUpdatingRegressionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWampler3() throws MathException {
|
||||
public void testWampler3() {
|
||||
double[] data = new double[]{
|
||||
760, 0,
|
||||
-2042, 1,
|
||||
|
@ -561,7 +560,7 @@ public class MillerUpdatingRegressionTest {
|
|||
}
|
||||
|
||||
//@Test
|
||||
public void testWampler4() throws MathException {
|
||||
public void testWampler4() {
|
||||
double[] data = new double[]{
|
||||
75901, 0,
|
||||
-204794, 1,
|
||||
|
@ -759,7 +758,7 @@ public class MillerUpdatingRegressionTest {
|
|||
// }
|
||||
|
||||
@Test
|
||||
public void testOneRedundantColumn() throws MathException {
|
||||
public void testOneRedundantColumn() {
|
||||
MillerUpdatingRegression instance = new MillerUpdatingRegression(4, false);
|
||||
MillerUpdatingRegression instance2 = new MillerUpdatingRegression(5, false);
|
||||
double[][] x = new double[airdata[0].length][];
|
||||
|
@ -822,7 +821,7 @@ public class MillerUpdatingRegressionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testThreeRedundantColumn() throws MathException {
|
||||
public void testThreeRedundantColumn() {
|
||||
|
||||
MillerUpdatingRegression instance = new MillerUpdatingRegression(4, false);
|
||||
MillerUpdatingRegression instance2 = new MillerUpdatingRegression(7, false);
|
||||
|
@ -1061,7 +1060,7 @@ public class MillerUpdatingRegressionTest {
|
|||
|
||||
|
||||
@Test
|
||||
public void testSubsetRegression() throws MathException {
|
||||
public void testSubsetRegression() {
|
||||
|
||||
MillerUpdatingRegression instance = new MillerUpdatingRegression(3, true);
|
||||
MillerUpdatingRegression redRegression = new MillerUpdatingRegression(2, true);
|
||||
|
|
Loading…
Reference in New Issue