| 14 | public class TestOpt extends TestCase { |
| 15 | |
| 16 | private static final class LinFun implements ScalarFn { |
| 17 | public final double sign; |
| 18 | public final double x0; |
| 19 | |
| 20 | public LinFun(final double x0, final double sign) { |
| 21 | this.sign = sign; |
| 22 | this.x0 = x0; |
| 23 | } |
| 24 | |
| 25 | @Override |
| 26 | public double eval(final double x) { |
| 27 | final double diff = x - x0; |
| 28 | return sign*diff*diff; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | public void testLinMax() { |
| 33 | final LinFun f = new LinFun(3.2,-1.0); |
nothing calls this directly
no outgoing calls
no test coverage detected