Examples of CyclicBeginExtension


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

            throw new IllegalArgumentException("Data vectors must have equal size.");
        }
       
        double[] extendedApproximation;
        extendedApproximation = new Extensioner(approximation)
                .schedule(new CyclicBeginExtension(lowReconstructionFilter.getLength()))
                .execute();

        extendedApproximation = sampler.upsample(extendedApproximation);
        extendedApproximation = MathUtils.convolve(extendedApproximation, lowReconstructionFilter.getCoeff());

        double[] extendedDetails;
        extendedDetails = new Extensioner(details)
                .schedule(new CyclicBeginExtension(highReconstructionFilter.getLength()))
                .execute();

        extendedDetails = sampler.upsample(extendedDetails);
        extendedDetails = MathUtils.convolve(extendedDetails, highReconstructionFilter.getCoeff());
View Full Code Here

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

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

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

        assertEquals(data.length + filter.getCoeff().length, result.length);

        double[] expected = {3, 4, 1, 2, 3, 4};
View Full Code Here

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

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

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

        double[] expected = {2, 1, 2, 1, 2, 1, 2, 1, 2};
        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.