Package ru.ifmo.diplom.kirilchuk.jawelet.util.extensioner

Examples of ru.ifmo.diplom.kirilchuk.jawelet.util.extensioner.Extensioner


        int value = MathUtils.getClosest2PowerValue(data.length);
        int level = MathUtils.getExact2Power(value);

        //extending if need
        if(data.length - value < 0) {
            data = new Extensioner(data)
                    .schedule(new ZeroPaddingTo2Power(level))
                    .execute();
        }

        return decompose(data, level);
View Full Code Here


        double[] result;
       
        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);
View Full Code Here

        double[] result;

        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());
View Full Code Here

        if (approximation.length != details.length) {
            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

       
//        while(approxLength <= data.length/2) {
            double[] approximation = new double[approxLength];
            System.arraycopy(data, 0, approximation, 0, approxLength);

            double[] extendedApproximation = new Extensioner(approximation)
                    .schedule(new CopyElementToBegin(0))
                    .schedule(new AddLastToEnd())
                    .execute();

            extendedApproximation = sampler.upsample(extendedApproximation);
            extendedApproximation = MathUtils.convolve(extendedApproximation, lowReconstructionFilter.getCoeff());
            extendedApproximation = windower.window(extendedApproximation, 2, approximation.length * 2 + 2);

            double[] details = new double[approxLength]; //must have same length with approximation
            System.arraycopy(data, approxLength, details, 0, approxLength);
            double[] extendedDetails = new Extensioner(details)
                    .schedule(new CopyElementToBegin(1))
                    .schedule(new AddLastToEnd())
                    .execute();

            extendedDetails = sampler.upsample(extendedDetails);
View Full Code Here

        Filter highDecompositionFilter = filtersFactory.getHighDecompositionFilter();

        double[] approximation = new double[endIndex]; //working only with approximation coefficients
        System.arraycopy(data, 0, approximation, 0, endIndex);

        double[] temp = new Extensioner(approximation)
                .schedule(new MirrorExtension(1))
                .execute();

        //TODO ugly but need one more element...
        double[] extended = new double[temp.length + 1];
View Full Code Here

TOP

Related Classes of ru.ifmo.diplom.kirilchuk.jawelet.util.extensioner.Extensioner

Copyright © 2018 www.massapicom. 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.