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

ran the daikon tests for basesecantsolver except for the soSolve function

parent db01f37d
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ import System.Directory ...@@ -7,7 +7,7 @@ import System.Directory
import Data.List import Data.List
testNr :: Int testNr :: Int
testNr = 2 testNr = 3
source, pathDir, packageDir, methodName :: String source, pathDir, packageDir, methodName :: String
source = case testNr of source = case testNr of
...@@ -21,7 +21,7 @@ pathDir = case testNr of ...@@ -21,7 +21,7 @@ pathDir = case testNr of
methodName = case testNr of methodName = case testNr of
1 -> "hasNext" 1 -> "hasNext"
2 -> "value" 2 -> "value"
3 -> "doSolve" 3 -> "verifyBracketing"
packageDir = map (\c -> if c == '/' then '.' else c) pathDir packageDir = map (\c -> if c == '/' then '.' else c) pathDir
......
...@@ -8,4 +8,10 @@ GradientFunction: ...@@ -8,4 +8,10 @@ GradientFunction:
5 mutations with error found: 2, 9, 13, 14, 22 5 mutations with error found: 2, 9, 13, 14, 22
4 mutations with error found not detected by wlp: 9, 13, 14, 22 4 mutations with error found not detected by wlp: 9, 13, 14, 22
0 mutations with unterminated calls 0 mutations with unterminated calls
0 mutations stuck in a loop
BaseSecantSolver (doSolve not checked yet):
0 mutations with error found:
0 mutations with error found not detected by wlp:
0 mutations with unterminated calls
0 mutations stuck in a loop 0 mutations stuck in a loop
\ No newline at end of file
...@@ -52,7 +52,7 @@ import org.apache.commons.math3.util.FastMath; ...@@ -52,7 +52,7 @@ import org.apache.commons.math3.util.FastMath;
* *
* @since 3.0 * @since 3.0
*/ */
public abstract class BaseSecantSolver public class BaseSecantSolver
extends AbstractUnivariateSolver extends AbstractUnivariateSolver
implements BracketedUnivariateSolver<UnivariateFunction> { implements BracketedUnivariateSolver<UnivariateFunction> {
...@@ -71,7 +71,7 @@ public abstract class BaseSecantSolver ...@@ -71,7 +71,7 @@ public abstract class BaseSecantSolver
* @param absoluteAccuracy Absolute accuracy. * @param absoluteAccuracy Absolute accuracy.
* @param method <em>Secant</em>-based root-finding method to use. * @param method <em>Secant</em>-based root-finding method to use.
*/ */
protected BaseSecantSolver(final double absoluteAccuracy, final Method method1) { public BaseSecantSolver(final double absoluteAccuracy, final Method method1) {
super(absoluteAccuracy); super(absoluteAccuracy);
this.allowed = AllowedSolution.ANY_SIDE; this.allowed = AllowedSolution.ANY_SIDE;
this.method = method1; this.method = method1;
...@@ -84,7 +84,7 @@ public abstract class BaseSecantSolver ...@@ -84,7 +84,7 @@ public abstract class BaseSecantSolver
* @param absoluteAccuracy Absolute accuracy. * @param absoluteAccuracy Absolute accuracy.
* @param method <em>Secant</em>-based root-finding method to use. * @param method <em>Secant</em>-based root-finding method to use.
*/ */
protected BaseSecantSolver(final double relativeAccuracy, public BaseSecantSolver(final double relativeAccuracy,
final double absoluteAccuracy1, final double absoluteAccuracy1,
final Method method2) { final Method method2) {
super(relativeAccuracy, absoluteAccuracy1); super(relativeAccuracy, absoluteAccuracy1);
...@@ -100,7 +100,7 @@ public abstract class BaseSecantSolver ...@@ -100,7 +100,7 @@ public abstract class BaseSecantSolver
* @param functionValueAccuracy Maximum function value error. * @param functionValueAccuracy Maximum function value error.
* @param method <em>Secant</em>-based root-finding method to use * @param method <em>Secant</em>-based root-finding method to use
*/ */
protected BaseSecantSolver(final double relativeAccuracy2, public BaseSecantSolver(final double relativeAccuracy2,
final double absoluteAccuracy2, final double absoluteAccuracy2,
final double functionValueAccuracy, final double functionValueAccuracy,
final Method method3) { final Method method3) {
...@@ -109,7 +109,7 @@ public abstract class BaseSecantSolver ...@@ -109,7 +109,7 @@ public abstract class BaseSecantSolver
this.method = method3; this.method = method3;
} }
protected final double doSolve() public final double doSolve()
throws ConvergenceException { throws ConvergenceException {
// Get initial solution // Get initial solution
double x0 = getMin(); double x0 = getMin();
...@@ -302,4 +302,20 @@ public abstract class BaseSecantSolver ...@@ -302,4 +302,20 @@ public abstract class BaseSecantSolver
} }
} }
public double solve(int maxEval, UnivariateFunction f, double min, double max, double startValue,
AllowedSolution allowedSolution)
{
return 0;
}
public double solve(int maxEval, UnivariateFunction f, double min, double max,
AllowedSolution allowedSolution)
{
return 0;
}
} }
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