Skip to content

Commit 6d39fa6

Browse files
committed
Add the interface NonLinearEquationSolver
1 parent 0da98da commit 6d39fa6

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

src/main/java/it/geoframe/blogspot/numerical/ode/NestedNewton.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @author Niccolò Tubini, Giuseppe Formetta
2525
*
2626
*/
27-
public class NestedNewton {
27+
public class NestedNewton implements NonLinearEquationSolver {
2828

2929
private double x0;
3030

src/main/java/it/geoframe/blogspot/numerical/ode/NewtonRaphson.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @author Niccolò Tubini, Giuseppe Formetta
2525
*
2626
*/
27-
public class NewtonRaphson {
27+
public class NewtonRaphson implements NonLinearEquationSolver {
2828

2929
private double x0;
3030

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* GNU GPL v3 License
3+
*
4+
* Copyright 2021 Niccolò Tubini, Giuseppe Formetta, Riccardo Rigon
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
package it.geoframe.blogspot.numerical.ode;
21+
22+
23+
/**
24+
* @author Niccolò Tubini, Giuseppe Formetta
25+
*
26+
*/
27+
public interface NonLinearEquationSolver {
28+
29+
30+
public double solve( double x, OrdinaryDifferentialEquation ode );
31+
32+
}

0 commit comments

Comments
 (0)