Search in sources :

Example 26 with UniformRandomProvider

use of org.apache.commons.rng.UniformRandomProvider in project GDSC-SMLM by aherbert.

the class SumFilterTest method intRollingBlockSum3x3AndRollingBlockSumNxNReturnSameResult.

@SeededTest
void intRollingBlockSum3x3AndRollingBlockSumNxNReturnSameResult(RandomSeed seed) {
    final UniformRandomProvider rg = RngUtils.create(seed.getSeed());
    final SumFilter filter = new SumFilter();
    for (final int width : primes) {
        for (final int height : primes) {
            intCompareRollingBlockSum3x3AndRollingBlockSumNxN(rg, filter, width, height);
        }
    }
}
Also used : UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest)

Example 27 with UniformRandomProvider

use of org.apache.commons.rng.UniformRandomProvider in project GDSC-SMLM by aherbert.

the class SumFilterTest method floatBlockSum3x3InternalAndRollingBlockSumNxNInternalReturnSameResult.

@SeededTest
public void floatBlockSum3x3InternalAndRollingBlockSumNxNInternalReturnSameResult(RandomSeed seed) {
    final UniformRandomProvider rg = RngUtils.create(seed.getSeed());
    final SumFilter filter = new SumFilter();
    for (final int width : primes) {
        for (final int height : primes) {
            floatCompareBlockSum3x3InternalAndRollingBlockSumNxNInternal(rg, filter, width, height);
        }
    }
}
Also used : UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest)

Example 28 with UniformRandomProvider

use of org.apache.commons.rng.UniformRandomProvider in project GDSC-SMLM by aherbert.

the class SumFilterTest method intRollingBlockSumNxNInternalAndRollingBlockSumNxNInternalTransposedReturnSameResult.

@SeededTest
void intRollingBlockSumNxNInternalAndRollingBlockSumNxNInternalTransposedReturnSameResult(RandomSeed seed) {
    final UniformRandomProvider rg = RngUtils.create(seed.getSeed());
    final SumFilter filter = new SumFilter();
    for (final int width : primes) {
        for (final int height : primes) {
            for (final int boxSize : boxSizes) {
                intCompareRollingBlockSumNxNInternalAndRollingBlockSumNxNInternalTransposed(rg, filter, width, height, boxSize);
            }
        }
    }
}
Also used : UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest)

Example 29 with UniformRandomProvider

use of org.apache.commons.rng.UniformRandomProvider in project GDSC-SMLM by aherbert.

the class SumFilterTest method intBlockSum3x3AndBlockSumNxNReturnSameResult.

@SeededTest
void intBlockSum3x3AndBlockSumNxNReturnSameResult(RandomSeed seed) {
    final UniformRandomProvider rg = RngUtils.create(seed.getSeed());
    final SumFilter filter = new SumFilter();
    for (final int width : primes) {
        for (final int height : primes) {
            intCompareBlockSum3x3AndBlockSumNxN(rg, filter, width, height);
        }
    }
}
Also used : UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest)

Example 30 with UniformRandomProvider

use of org.apache.commons.rng.UniformRandomProvider in project GDSC-SMLM by aherbert.

the class SumFilterTest method floatBlockSumNxNAndStripedBlockSumNxNReturnSameResult.

@SeededTest
void floatBlockSumNxNAndStripedBlockSumNxNReturnSameResult(RandomSeed seed) {
    final UniformRandomProvider rg = RngUtils.create(seed.getSeed());
    final SumFilter filter = new SumFilter();
    for (final int width : primes) {
        for (final int height : primes) {
            for (final int boxSize : boxSizes) {
                floatCompareBlockSumNxNAndStripedBlockSumNxN(rg, filter, width, height, boxSize);
            }
        }
    }
}
Also used : UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest)

Aggregations

UniformRandomProvider (org.apache.commons.rng.UniformRandomProvider)213 SeededTest (uk.ac.sussex.gdsc.test.junit5.SeededTest)145 SharedStateContinuousSampler (org.apache.commons.rng.sampling.distribution.SharedStateContinuousSampler)17 TimingService (uk.ac.sussex.gdsc.test.utils.TimingService)14 Rectangle (java.awt.Rectangle)13 DoubleDoubleBiPredicate (uk.ac.sussex.gdsc.test.api.function.DoubleDoubleBiPredicate)13 SpeedTag (uk.ac.sussex.gdsc.test.junit5.SpeedTag)12 TDoubleArrayList (gnu.trove.list.array.TDoubleArrayList)10 ArrayList (java.util.ArrayList)10 NormalizedGaussianSampler (org.apache.commons.rng.sampling.distribution.NormalizedGaussianSampler)9 StoredDataStatistics (uk.ac.sussex.gdsc.core.utils.StoredDataStatistics)8 CalibrationWriter (uk.ac.sussex.gdsc.smlm.data.config.CalibrationWriter)8 ContinuousSampler (org.apache.commons.rng.sampling.distribution.ContinuousSampler)6 ImageExtractor (uk.ac.sussex.gdsc.core.utils.ImageExtractor)6 LocalList (uk.ac.sussex.gdsc.core.utils.LocalList)6 Gaussian2DFunction (uk.ac.sussex.gdsc.smlm.function.gaussian.Gaussian2DFunction)6 FloatProcessor (ij.process.FloatProcessor)5 ErfGaussian2DFunction (uk.ac.sussex.gdsc.smlm.function.gaussian.erf.ErfGaussian2DFunction)5 TimingResult (uk.ac.sussex.gdsc.test.utils.TimingResult)5 File (java.io.File)4