Examples of FECParameters


Examples of net.fec.openrq.parameters.FECParameters

        @Test(expected = IndexOutOfBoundsException.class)
        public void test_IOOBE_largeOffset() {

            final byte[] data = new byte[1];
            final int offset = 1;
            final FECParameters fecParams = PARAMS_WITH_DATA_LENGTH_OF_1;

            OpenRQ.newEncoder(data, offset, fecParams);
        }
View Full Code Here

Examples of net.fec.openrq.parameters.FECParameters

        @Test(expected = IndexOutOfBoundsException.class)
        public void test_IOOBE_dataLength() {

            final byte[] data = new byte[1];
            final int offset = 0;
            final FECParameters fecParams = PARAMS_WITH_DATA_LENGTH_OF_2;

            OpenRQ.newEncoder(data, offset, fecParams);
        }
View Full Code Here

Examples of net.fec.openrq.parameters.FECParameters

    public static final class NewDecoder {

        @Test
        public void testNoExceptions() {

            final FECParameters fecParams = TestingCommon.Minimal.fecParameters();
            final int extraSymbols = 0;

            OpenRQ.newDecoder(fecParams, extraSymbols);
        }
View Full Code Here

Examples of net.fec.openrq.parameters.FECParameters

        }

        @Test(expected = NullPointerException.class)
        public void test_NPE() {

            final FECParameters fecParams = null;
            final int extraSymbols = 0;

            OpenRQ.newDecoder(fecParams, extraSymbols);
        }
View Full Code Here

Examples of net.fec.openrq.parameters.FECParameters

        }

        @Test(expected = IllegalArgumentException.class)
        public void test_IAE_dataLength() {

            final FECParameters fecParams = PARAMS_WITH_DATA_LENGTH_OF_INTMAXPLUS1;
            final int extraSymbols = 0;

            OpenRQ.newDecoder(fecParams, extraSymbols);
        }
View Full Code Here

Examples of net.fec.openrq.parameters.FECParameters

        }

        @Test(expected = IllegalArgumentException.class)
        public void test_IAE_negExtraSymbols() {

            final FECParameters fecParams = TestingCommon.Minimal.fecParameters();
            final int extraSymbols = -1;

            OpenRQ.newDecoder(fecParams, extraSymbols);
        }
View Full Code Here

Examples of net.fec.openrq.parameters.FECParameters

        TestingCommon.checkParamsForSingleSourceBlockData(F, K);
        if (overhead < 0) throw new IllegalArgumentException("symbol overhead must be non-negative");

        // force single source block
        final FECParameters fecParams = FECParameters.newParameters(F, ceilDiv(F, K), 1);
        final Random rand = TestingCommon.newSeededRandom();

        final byte[] data = TestingCommon.randomBytes(F, rand);
        final int numESIs = K + overhead;
        final Set<Integer> esis = randomESIs(rand, K, numESIs);
View Full Code Here

Examples of net.fec.openrq.parameters.FECParameters

    private static ArraySourceBlockEncoder newSBEncoder(int F, int K) {

        TestingCommon.checkParamsForSingleSourceBlockData(F, K);

        // force single source block
        final FECParameters fecParams = FECParameters.newParameters(F, ceilDiv(F, K), 1);
        final Random rand = TestingCommon.newSeededRandom();

        final byte[] data = TestingCommon.randomBytes(F, rand);
        return (ArraySourceBlockEncoder)OpenRQ.newEncoder(data, fecParams).sourceBlock(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.