Examples of CyclicEndExtension


Examples of ru.ifmo.diplom.kirilchuk.jawelet.util.extensioner.actions.CyclicEndExtension

        Action zeroPaddingToEven = new ZeroPaddingToEven();

        int extra = zeroPaddingToEven.getExtensionLength(data.length);
        result = new Extensioner(data)
                .schedule(zeroPaddingToEven)
                .schedule(new CyclicEndExtension(lowDecompositionFilter.getLength()))
                .execute();
        result = MathUtils.convolve(result, lowDecompositionFilter.getCoeff());
        result = sampler.downsample(result);

        int filterLength = lowDecompositionFilter.getCoeff().length;
View Full Code Here

Examples of ru.ifmo.diplom.kirilchuk.jawelet.util.extensioner.actions.CyclicEndExtension

        Action zeroPaddingToEven = new ZeroPaddingToEven();
       
        int extra = zeroPaddingToEven.getExtensionLength(data.length);
        result = new Extensioner(data)
                .schedule(zeroPaddingToEven)
                .schedule(new CyclicEndExtension(highDecompositionFilter.getLength()))
                .execute();

        result = MathUtils.convolve(result, highDecompositionFilter.getCoeff());
        result = sampler.downsample(result);
View Full Code Here

Examples of ru.ifmo.diplom.kirilchuk.jawelet.util.extensioner.actions.CyclicEndExtension

    public void testExtendEnd() {
        double[] data = {1, 2, 3, 4};
        Filter filter = new Filter(new double[]{2, 8, 4, -1});

        double[] result = new Extensioner(data)
                .schedule(new CyclicEndExtension(filter.getLength()))
                .execute();
        double[] expected = {1, 2, 3, 4, 1, 2, 3, 4};
        assertEquals(expected.length, result.length);
        assertArrayEquals(expected, result, 0);

        data = new double[]{1, 2, 3};
        result = new Extensioner(data)
                .schedule(new ZeroPaddingToEven())
                .schedule(new CyclicEndExtension(filter.getLength()))
                .execute();
        expected = new double[]{1, 2, 3, 0, 1, 2, 3, 0};
        assertEquals(expected.length, result.length);
        assertArrayEquals(expected, result, 0);
    }
View Full Code Here

Examples of ru.ifmo.diplom.kirilchuk.jawelet.util.extensioner.actions.CyclicEndExtension

    public void testEndExtensionWhenFilterLongButDataSmall() {
        double[] data = {1, 2};
        Filter filter = new Filter(new double[]{1, 1, 1, 1, 1, 1, 1});

        double[] result = new Extensioner(data)
                .schedule(new CyclicEndExtension(filter.getLength()))
                .execute();

        double[] expected = {1, 2, 1, 2, 1, 2, 1, 2, 1};
        assertArrayEquals(expected, result, 0);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.