use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testLogOnePlusX.
@Test
public void testLogOnePlusX() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(LogOnePlusX.class, out, in);
assertEquals(out.get(), Math.log1p(1234567890), 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testAbs.
@Test
public void testAbs() {
final LongType in = new LongType(-LARGE_NUM);
final LongType out = (LongType) ops.run(Abs.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 testArcsin.
@Test
public void testArcsin() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Arcsin.class, out, in);
assertEquals(out.get(), Math.asin(1234567890), 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testRound.
@Test
public void testRound() {
final LongType in = new LongType(LARGE_NUM);
final LongType out = (LongType) ops.run(Round.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 testSech.
@Test
public void testSech() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Sech.class, out, in);
assertEquals(out.get(), 1 / Math.cosh(1234567890), 0.0);
}
Aggregations