git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1200393 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-11-10 15:52:30 +00:00
parent 6c4ee56c3d
commit e92986db74
4 changed files with 11 additions and 15 deletions

View File

@ -952,9 +952,7 @@ public class SparseRealVectorTest {
v1.setEntry(1, 3);
v1.setEntry(2, 0);
RealVector w;
w = u.ebeMultiply(v1);
w = u.ebeDivide(v1);
u.ebeMultiply(v1);
u.ebeDivide(v1);
}
}

View File

@ -58,7 +58,6 @@ public class BOBYQAOptimizerTest {
@Test(expected=NumberIsTooSmallException.class)
public void testProblemDimensionTooSmall() {
double[] startPoint = point(1, 0.5);
double[][] boundaries = null;
doTest(new Rosen(), startPoint, null,
GoalType.MINIMIZE,
1e-13, 1e-6, 2000, null);
@ -429,7 +428,7 @@ public class BOBYQAOptimizerTest {
}
private static class DiffPow implements MultivariateRealFunction {
private int fcount = 0;
// private int fcount = 0;
public double value(double[] x) {
double f = 0;
for (int i = 0; i < x.length; ++i)

View File

@ -211,13 +211,12 @@ public class LevenbergMarquardtOptimizerTest {
}, new double[] { 1, 1, 1 });
LevenbergMarquardtOptimizer optimizer = new LevenbergMarquardtOptimizer();
VectorialPointValuePair optimum
= optimizer.optimize(100, problem, problem.target,
new double[] { 1, 1, 1 },
new double[] { 0, 0, 0 });
optimizer.optimize(100, problem, problem.target,
new double[] { 1, 1, 1 },
new double[] { 0, 0, 0 });
Assert.assertTrue(FastMath.sqrt(problem.target.length) * optimizer.getRMS() > 0.6);
final double[][] m = optimizer.getCovariances();
optimizer.getCovariances();
}
@Test

View File

@ -94,7 +94,7 @@ public class StableRandomGeneratorTest extends TestCase {
*/
public void testAlphaRangeBelowZero() {
try {
StableRandomGenerator generator = new StableRandomGenerator(rg,
new StableRandomGenerator(rg,
-1.0, 0.0);
} catch (OutOfRangeException e) {
assertEquals(-1.0, e.getArgument());
@ -103,7 +103,7 @@ public class StableRandomGeneratorTest extends TestCase {
public void testAlphaRangeAboveTwo() {
try {
StableRandomGenerator generator = new StableRandomGenerator(rg,
new StableRandomGenerator(rg,
3.0, 0.0);
} catch (OutOfRangeException e) {
assertEquals(3.0, e.getArgument());
@ -112,7 +112,7 @@ public class StableRandomGeneratorTest extends TestCase {
public void testBetaRangeBelowMinusOne() {
try {
StableRandomGenerator generator = new StableRandomGenerator(rg,
new StableRandomGenerator(rg,
1.0, -2.0);
} catch (OutOfRangeException e) {
assertEquals(-2.0, e.getArgument());
@ -121,7 +121,7 @@ public class StableRandomGeneratorTest extends TestCase {
public void testBetaRangeAboveOne() {
try {
StableRandomGenerator generator = new StableRandomGenerator(rg,
new StableRandomGenerator(rg,
1.0, 2.0);
} catch (OutOfRangeException e) {
assertEquals(2.0, e.getArgument());