private static final double Z_MIN = 0;
private static final double Z_MAX = 200;
@Test
public void testObject() {
final FunctionalDoublesSurface f = getSurface();
final VolatilitySurface vol = new VolatilitySurface(f);
final FunctionalVolatilitySurfaceData data = new FunctionalVolatilitySurfaceData(vol, X_LABEL, X_MIN, X_MAX, NX, Y_LABEL,
Y_MIN, Y_MAX, NY, Z_MIN, Z_MAX);
assertEquals(X_LABEL, data.getXLabel());
assertEquals(X_MIN, data.getXMinimum());
assertEquals(X_MAX, data.getXMaximum());
assertEquals(NX, data.getNXSamples());
assertEquals(Y_LABEL, data.getYLabel());
assertEquals(Y_MIN, data.getYMinimum());
assertEquals(Y_MAX, data.getYMaximum());
assertEquals(NY, data.getNYSamples());
assertEquals(Z_MIN, data.getZMinimum());
assertEquals(Z_MAX, data.getZMaximum());
FunctionalVolatilitySurfaceData other = new FunctionalVolatilitySurfaceData(vol, X_LABEL, X_MIN, X_MAX, NX, Y_LABEL, Y_MIN, Y_MAX, NY, Z_MIN, Z_MAX);
assertEquals(data, other);
final FunctionalDoublesSurface otherF = FunctionalDoublesSurface.from(new Function<Double, Double>() {
@Override
public Double evaluate(final Double... x) {
return 3 * x[0] - 5 * x[1];
}