Skip to content
Snippets Groups Projects
Commit ab8ec084 authored by Koen Wermer's avatar Koen Wermer
Browse files

finished the experiments

parent d7eaecaf
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ GradientFunction: ...@@ -11,7 +11,7 @@ GradientFunction:
0 mutations stuck in a loop 0 mutations stuck in a loop
BaseSecantSolver: BaseSecantSolver:
0 mutations with error found: 3 mutations with error found: 49, 90, 122 (in the daikon version)
0 mutations with error found not detected by wlp: 3 mutations with error found not detected by wlp: 49, 90, 122 (in the daikon version)
0 mutations with unterminated calls 0 mutations with unterminated calls
0 mutations stuck in a loop 0 mutations stuck in a loop
\ No newline at end of file
...@@ -5,4 +5,30 @@ postCondPrimType: returnValueVar == returnValue ...@@ -5,4 +5,30 @@ postCondPrimType: returnValueVar == returnValue
ignoreLibMethods: False ignoreLibMethods: False
ignoreMainMethod: False ignoreMainMethod: False
nrOfUnroll: 1 nrOfUnroll: 1
erronous mutations detected: erronous mutations detected:
\ No newline at end of file 206 verifyBracketing
200 verifyInterval1
200 verifySequence1
200 verifyBracketing
197 isSequence1
196 isSequence1
195 isSequence1
194 isSequence1
193 isSequence1
192 isSequence1
191 isSequence1
190 isSequence1
189 isSequence1
188 isSequence1
152 midpoint
151 midpoint
150 midpoint
149 midpoint
148 midpoint
147 midpoint
146 midpoint
145 midpoint
144 midpoint
143 midpoint
Total number of mutants: 207
Number of mutants in which we found an error: 22
\ No newline at end of file
...@@ -30,7 +30,7 @@ import org.apache.commons.math3.exception.util.LocalizedFormats; ...@@ -30,7 +30,7 @@ import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.exception.TooManyEvaluationsException; import org.apache.commons.math3.exception.TooManyEvaluationsException;
import org.apache.commons.math3.analysis.function.Abs; import org.apache.commons.math3.analysis.function.Exp;
/** /**
* Base class for all bracketing <em>Secant</em>-based methods for root-finding * Base class for all bracketing <em>Secant</em>-based methods for root-finding
...@@ -112,7 +112,7 @@ public class BaseSecantSolver ...@@ -112,7 +112,7 @@ public class BaseSecantSolver
this.method = method3; this.method = method3;
} }
public static double doSolve1(final double ftol, final double atol, final double rtol, double x0, double x1, Method method, AllowedSolution allowed, Abs function) public static double doSolve1(final double ftol, final double atol, final double rtol, double x0, double x1, Method method, AllowedSolution allowed, Exp function)
throws ConvergenceException { throws ConvergenceException {
double f0 = computeObjectiveValue1(x0, function); double f0 = computeObjectiveValue1(x0, function);
...@@ -136,7 +136,7 @@ public class BaseSecantSolver ...@@ -136,7 +136,7 @@ public class BaseSecantSolver
boolean inverted = false; boolean inverted = false;
// Keep finding better approximations. // Keep finding better approximations.
for(int i = 0; i < 100; i++) { for(int i = 0; i < 10000; i++) {
// Calculate the next approximation. // Calculate the next approximation.
final double x = x1 - ((f1 * (x1 - x0)) / (f1 - f0)); final double x = x1 - ((f1 * (x1 - x0)) / (f1 - f0));
final double fx = computeObjectiveValue1(x, function); final double fx = computeObjectiveValue1(x, function);
...@@ -248,7 +248,7 @@ public class BaseSecantSolver ...@@ -248,7 +248,7 @@ public class BaseSecantSolver
return (a + b) * 0.5; return (a + b) * 0.5;
} }
public static boolean isBracketing(Abs function1, public static boolean isBracketing(Exp function1,
final double lower1, final double lower1,
final double upper1) final double upper1)
throws NullArgumentException { throws NullArgumentException {
...@@ -283,7 +283,7 @@ public class BaseSecantSolver ...@@ -283,7 +283,7 @@ public class BaseSecantSolver
verifyInterval1(initial, upper3); verifyInterval1(initial, upper3);
} }
public static void verifyBracketing(Abs function2, public static void verifyBracketing(Exp function2,
final double lower4, final double lower4,
final double upper4) final double upper4)
throws NullArgumentException, throws NullArgumentException,
...@@ -324,7 +324,7 @@ public class BaseSecantSolver ...@@ -324,7 +324,7 @@ public class BaseSecantSolver
} }
protected static double computeObjectiveValue1(double point, Abs function) protected static double computeObjectiveValue1(double point, Exp function)
{ {
return function.value(point); return function.value(point);
} }
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment