Examples of nextSetBit()


Examples of au.csiro.snorocket.core.util.FeatureSet.nextSetBit()

        for (NF8 nf8 : as.getNf8Axioms()) {
            addTerms(deltaNF8, nf8);
        }

        FeatureSet fs = deltaNF8.keySet();
        for (int fid = fs.nextSetBit(0); fid >= 0; fid = fs.nextSetBit(fid+1)) {
            for (IntIterator it = ontologyNF7.keyIterator(); it.hasNext();) {
                int a = it.next();
                Context aCtx = contextIndex.get(a);

                for (Iterator<NF7> i = ontologyNF7.get(a).iterator(); i.hasNext();) {
View Full Code Here

Examples of com.carrotsearch.hppc.BitSet.nextSetBit()

                cluster.addPhrases(labelFormatter.format(context, labelFeature));
                cluster.setAttribute(Cluster.SCORE, clusterLabelScore[i]);

                // Add documents
                final BitSet bs = clusterDocuments[i];
                for (int bit = bs.nextSetBit(0); bit >= 0; bit = bs.nextSetBit(bit + 1))
                {
                    cluster.addDocuments(documents.get(bit));
                }

                // Add cluster
View Full Code Here

Examples of com.carrotsearch.hppc.BitSetIterator.nextSetBit()

    @Test
    public void testBitSetIteratorHPPC() throws Exception
    {
        final BitSetIterator bi = hppc.iterator();
        int sum = 0;
        for (int i = bi.nextSetBit(); i >= 0; i = bi.nextSetBit())
        {
            sum += i;
        }
        guard = sum;
    }
View Full Code Here

Examples of java.util.BitSet.nextSetBit()

            bsProto.and(bsProtoPruner[1][(f.getY()+128) >> 2]);
            bsProto.and(bsProtoPruner[2][f.getTheta() >> 2]);
           
            if (!bsProto.isEmpty()) {
                for (int nProto=0;
                    -1 != (nProto = bsProto.nextSetBit(nProto));
                    nProto++) {
                    LearntFeature lf = proto.get(nProto);
                    byte rbConfigs[] = lf.getConfigs();
                    int nX = Math.abs(lf.getA() * f.getX() - lf.getB() * f.getY() + lf.getC());
                    int nY = Math.abs((f.getTheta() - lf.getAngle()) << 8);
View Full Code Here

Examples of java.util.BitSet.nextSetBit()

            }
        }
        this.mrbConfig = new byte[Configs.cardinality()];
        int nBit = 0;
        for (int nConfig = 0;
        -1 != (nConfig = Configs.nextSetBit(nConfig));
        nConfig++) {
          this.mrbConfig[nBit++] = (byte) nConfig;
        }
    }
   
View Full Code Here

Examples of java.util.BitSet.nextSetBit()

        // Select a subset of data points to be the new centroids.
        BitSet selectedCentroids = Statistics.randomDistribution(
                numCentroids, dataPoints.rows());

        // Convert the selection indices into vectors.
        for (int c = 0, i = selectedCentroids.nextSetBit(0); i >= 0;
                c++, i = selectedCentroids.nextSetBit(i+1))
            centers[c] = dataPoints.getRowVector(i);

        return centers;
    }
View Full Code Here

Examples of java.util.BitSet.nextSetBit()

        BitSet selectedCentroids = Statistics.randomDistribution(
                numCentroids, dataPoints.rows());

        // Convert the selection indices into vectors.
        for (int c = 0, i = selectedCentroids.nextSetBit(0); i >= 0;
                c++, i = selectedCentroids.nextSetBit(i+1))
            centers[c] = dataPoints.getRowVector(i);

        return centers;
    }
}
View Full Code Here

Examples of java.util.BitSet.nextSetBit()

        // Output the assignments for a single clustering.
        int clusterId = 0;
        for (Cluster<SparseDoubleVector> cluster : newClusters) {
            BitSet contextIds = cluster.dataPointIds();
            for (int contextId = contextIds.nextSetBit(0); contextId >= 0;
                     contextId = contextIds.nextSetBit(contextId + 1)) {
                reporter.updateAssignment(
                        primaryKey, contextLabels[contextId], clusterId);
            }
            clusterId++;
View Full Code Here

Examples of java.util.BitSet.nextSetBit()

        // Output the assignments for a single clustering.
        int clusterId = 0;
        for (Cluster<SparseDoubleVector> cluster : newClusters) {
            BitSet contextIds = cluster.dataPointIds();
            for (int contextId = contextIds.nextSetBit(0); contextId >= 0;
                     contextId = contextIds.nextSetBit(contextId + 1)) {
                reporter.updateAssignment(
                        primaryKey, contextLabels[contextId], clusterId);
            }
            clusterId++;
        }
View Full Code Here

Examples of java.util.BitSet.nextSetBit()

        // Fill in each assignment with the secondary key attached to each
        // context id.
        String[] contextLabels = new String[totalAssignments];
        for (Map.Entry<String, BitSet> entry : termContexts.entrySet()) {
            BitSet contextIds = entry.getValue();
            for (int contextId = contextIds.nextSetBit(0); contextId >= 0;
                     contextId = contextIds.nextSetBit(contextId+1))
                contextLabels[contextId] = entry.getKey();
        }
        return contextLabels;
    }
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.