1
2
3
4
5
6
7abstract
8public
9class SearchZero {
10
11
12
13
14 protected
15 double precision;
16
17
18
19
20 public
21 SearchZero() {
22 this(1e-10);
23 }
24
25 public
26 SearchZero(double precision) {
27 this.precision = precision;
28 }
29
30
31
32
33
34 abstract
35 public
36 double searchZero(double x1,
37 double x2,
38 RealFunction f)
39 throws NoZeroFoundException;
40
41
42
43
44
45
46
47
48 protected
49 int noOfCalls;
50
51 public
52 int getNoOfCalls() {
53 return
54 noOfCalls;
55 }
56
57}
58