Examples of key()


Examples of gnu.trove.iterator.TCharObjectIterator.key()

        }
        try {
            TCharObjectIterator iter = this.iterator();
            while ( iter.hasNext() ) {
                iter.advance();
                char key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
View Full Code Here

Examples of gnu.trove.iterator.TDoubleDoubleIterator.key()

  private TDoubleDoubleMap recalc_score_hash(TDoubleDoubleMap scores, double[] column, double least_sufficient) {
    TDoubleDoubleMap new_scores = new TDoubleDoubleHashMap(scores.size());
    TDoubleDoubleIterator iterator = scores.iterator();
    while(iterator.hasNext()) {
      iterator.advance();
      double score = iterator.key();
      double count = iterator.value();
      for (int letter = 0; letter < 4; ++letter) {
        double new_score = score + column[letter];
        if (new_score >= least_sufficient) {
          double add = count * background.count(letter);
 
View Full Code Here

Examples of gnu.trove.iterator.TDoubleObjectIterator.key()

        }
        try {
            TDoubleObjectIterator iter = this.iterator();
            while ( iter.hasNext() ) {
                iter.advance();
                double key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
View Full Code Here

Examples of gnu.trove.iterator.TFloatObjectIterator.key()

        }
        try {
            TFloatObjectIterator iter = this.iterator();
            while ( iter.hasNext() ) {
                iter.advance();
                float key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
View Full Code Here

Examples of gnu.trove.iterator.TIntByteIterator.key()

    }

    TIntByteIterator k = originalOpacity.iterator();
    while (k.hasNext()) {
      k.advance();
      org.getspout.spoutapi.material.Block block = MaterialData.getBlock(k.key());
      if (block != null) {
        modified.add(block);
      }
    }
    cachedBlockData = modified; // Save to cache
View Full Code Here

Examples of gnu.trove.iterator.TIntDoubleIterator.key()

            if (weight > maxSum) {
                maxSum = weight;
                ties.clear();
            }
            if (weight == maxSum)
                ties.add(iter.key());
           
        }
       
        // If there wasn't a tie after all
        int[] options = ties.toArray();
View Full Code Here

Examples of gnu.trove.iterator.TIntFloatIterator.key()

  public void addThruPipe(Instance inst) {
    HashSparseVector data = (HashSparseVector) inst.getData();
    TIntFloatIterator it = data.data.iterator();
    while (it.hasNext()) {
      it.advance();
      int id = it.key();
      if (idf[id] > 0) {
        float value = (float) (it.value()*Math.log(docNum / idf[id]));
        data.put(id, value);
      }
    }
View Full Code Here

Examples of gnu.trove.iterator.TIntIntIterator.key()

            TIntIntMap indexer = vectorSet.indexer;
            TIntIntIterator iter = indexer.iterator();
            kryo.writeObject(output, indexer.size());
            while (iter.hasNext()) {
                iter.advance();
                int vecid = iter.key();
                int start = iter.value();
                int length = vectorSet.length(vecid);
                kryo.writeObject(output, vecid);
                kryo.writeObject(output, start);
                kryo.writeObject(output, length);
View Full Code Here

Examples of gnu.trove.iterator.TIntLongIterator.key()

        iterator = map.iterator();
        assertTrue( iterator.hasNext() );
        iterator.advance();
    boolean found_one;
    if ( iterator.value() == 1 ) {
      assertEquals( KEY_ONE, iterator.key() );
      found_one = true;
    }
    else {
      assertEquals( 2, iterator.value() );
      assertEquals( KEY_TWO, iterator.key() );
View Full Code Here

Examples of gnu.trove.iterator.TIntObjectIterator.key()

        }
        try {
            TIntObjectIterator iter = this.iterator();
            while ( iter.hasNext() ) {
                iter.advance();
                int key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
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.