Package org.apache.mahout.math.map

Examples of org.apache.mahout.math.map.OpenIntIntHashMap.containsKey()


      int justPrevNode = -1;
      while (nextNode != -1) {

        int parent = tree.parent(nextNode);

        if (prevNode.containsKey(parent)) {
          int prevNodeId = prevNode.get(parent);
          if (tree.childCount(prevNodeId) <= 1 && tree.childCount(nextNode) <= 1) {
            tree.addCount(prevNodeId, tree.count(nextNode));
            tree.addCount(nextNode, -1 * tree.count(nextNode));
            if (tree.childCount(nextNode) == 1) {
View Full Code Here


    public int containKeys(int [] keys)
    {
        final OpenIntIntHashMap prepared = this.instance;
        int count = 0;
        for (int i = 0; i < keys.length; i++)
            count += prepared.containsKey(keys[i]) ? 1 : 0;
        return count;
    }

    @Override
    public int putAll(int [] keys, int [] values)
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.