Search in sources :

Example 6 with DummyGradientFunction

use of uk.ac.sussex.gdsc.smlm.function.DummyGradientFunction in project GDSC-SMLM by aherbert.

the class FastMleGradient2ProcedureTest method gradientProcedureFactoryCreatesOptimisedProcedures.

@Test
void gradientProcedureFactoryCreatesOptimisedProcedures() {
    final double[] y = new double[0];
    Assertions.assertEquals(FastMleGradient2ProcedureUtils.createUnrolled(y, new DummyGradientFunction(4)).getClass(), FastMleGradient2Procedure4.class);
    Assertions.assertEquals(FastMleGradient2ProcedureUtils.createUnrolled(y, new DummyGradientFunction(5)).getClass(), FastMleGradient2Procedure5.class);
    Assertions.assertEquals(FastMleGradient2ProcedureUtils.createUnrolled(y, new DummyGradientFunction(6)).getClass(), FastMleGradient2Procedure6.class);
}
Also used : DummyGradientFunction(uk.ac.sussex.gdsc.smlm.function.DummyGradientFunction) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest) Test(org.junit.jupiter.api.Test)

Aggregations

DummyGradientFunction (uk.ac.sussex.gdsc.smlm.function.DummyGradientFunction)6 SeededTest (uk.ac.sussex.gdsc.test.junit5.SeededTest)6 Test (org.junit.jupiter.api.Test)1 Type (uk.ac.sussex.gdsc.smlm.fitting.nonlinear.gradient.LvmGradientProcedureUtils.Type)1 FastLog (uk.ac.sussex.gdsc.smlm.function.FastLog)1