use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testSinh.
@Test
public void testSinh() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Sinh.class, out, in);
assertEquals(out.get(), Math.sinh(1234567890), 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testFloor.
@Test
public void testFloor() {
final LongType in = new LongType(LARGE_NUM);
final LongType out = (LongType) ops.run(Floor.class, in.createVariable(), in);
assertEquals(out.get(), LARGE_NUM - 1);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testExpMinusOne.
@Test
public void testExpMinusOne() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(ExpMinusOne.class, out, in);
assertEquals(out.get(), Math.exp(1234567890) - 1, 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testReciprocal.
@Test
public void testReciprocal() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Reciprocal.class, out, in, 0.0);
assertEquals(out.get(), 1.0 / 1234567890, 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testInvert.
@Test
public void testInvert() {
final LongType in = new LongType(LARGE_NUM);
final LongType out = (LongType) ops.run(Invert.class, in.createVariable(), in, 9007199254740992.0, 9007199254740994.0);
assertEquals(out.get(), LARGE_NUM + 1);
}
Aggregations