Examples of nextZeroBit()


Examples of cc.redberry.core.utils.BitArray.nextZeroBit()

    public static int[] lengthsOfCycles(final byte[] permutation) {
        IntArrayList sizes = new IntArrayList();
        BitArray seen = new BitArray(permutation.length);
        int counter = 0;
        while (counter < permutation.length) {
            int start = seen.nextZeroBit(0);
            if (permutation[start] == start) {
                ++counter;
                seen.set(start);
                continue;
            }
View Full Code Here

Examples of cc.redberry.core.utils.BitArray.nextZeroBit()

    public int[][] cycles() {
        ArrayList<int[]> cycles = new ArrayList<>();
        BitArray seen = new BitArray(internalDegree());
        int counter = 0;
        while (counter < internalDegree()) {
            int start = seen.nextZeroBit(0);
            if (newIndexOf(start) == start) {
                ++counter;
                seen.set(start);
                continue;
            }
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.