MCPcopy Create free account
hub / github.com/abess-team/abess / actual_df

Method actual_df

python/include/unsupported/test/NumericalDiff.cpp:53–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 int actual_df(const VectorXd &x, MatrixXd &fjac) const
54 {
55 double tmp1, tmp2, tmp3, tmp4;
56 for (int i = 0; i < values(); i++)
57 {
58 tmp1 = i+1;
59 tmp2 = 16 - i - 1;
60 tmp3 = (i>=8)? tmp2 : tmp1;
61 tmp4 = (x[1]*tmp2 + x[2]*tmp3); tmp4 = tmp4*tmp4;
62 fjac(i,0) = -1;
63 fjac(i,1) = tmp1*tmp2/tmp4;
64 fjac(i,2) = tmp1*tmp3/tmp4;
65 }
66 return 0;
67 }
68};
69
70void test_forward()

Callers 2

test_forwardFunction · 0.80
test_centralFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected