@Test public void testStaticConstruction() { FunctionalDoublesSurface surface = new FunctionalDoublesSurface(F1); FunctionalDoublesSurface other = FunctionalDoublesSurface.from(F1); assertEquals(surface.getFunction(), other.getFunction()); assertFalse(surface.equals(other)); surface = new FunctionalDoublesSurface(F1, NAME1); other = FunctionalDoublesSurface.from(F1, NAME1); assertEquals(surface, other); }
@Test public void testGetters() { assertEquals(SURFACE.getName(), NAME1); assertEquals(SURFACE.getFunction(), F1); assertEquals(SURFACE.getZValue(1., 2.), F1.evaluate(1., 2.), 0); assertEquals(SURFACE.getZValue(DoublesPair.of(1., 4.)), F1.evaluate(1., 4.), 0); }