MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / RiddersMethodTest

Class RiddersMethodTest

JSAT/test/jsat/math/rootfinding/RiddersMethodTest.java:21–208  ·  view source on GitHub ↗

@author Edward Raff

Source from the content-addressed store, hash-verified

19 * @author Edward Raff
20 */
21public class RiddersMethodTest
22{
23 /**
24 * Root at 0
25 */
26 Function sinF = new Function() {
27
28 /**
29 *
30 */
31 private static final long serialVersionUID = -4942395915907632276L;
32
33 public double f(double... x)
34 {
35 return sin(x[0]);
36 }
37
38 public double f(Vec x)
39 {
40 return f(x.arrayCopy());
41 }
42 };
43
44 /**
45 * Root at 0 + 2nd param
46 */
47 Function sinFp1 = new Function() {
48
49 /**
50 *
51 */
52 private static final long serialVersionUID = -6913574202545691152L;
53
54 public double f(double... x)
55 {
56 return sin(x[0]+x[1]);
57 }
58
59 public double f(Vec x)
60 {
61 return f(x.arrayCopy());
62 }
63 };
64
65 /**
66 * Root at approx -4.87906
67 */
68 Function polyF = new Function() {
69
70 /**
71 *
72 */
73 private static final long serialVersionUID = -206733171455524905L;
74
75 public double f(double... x)
76 {
77 double xp = x[0];
78

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected