Java 类gnu.trove.iterator.TObjectDoubleIterator 实例源码

项目:spf    文件:TroveHashVector.java   
@Override
public Iterator<Pair<KeyArgs, Double>> iterator() {
    return new Iterator<Pair<KeyArgs, Double>>() {
        private final TObjectDoubleIterator<KeyArgs>    innerIterator   = values.iterator();

        @Override
        public boolean hasNext() {
            return innerIterator.hasNext();
        }

        @Override
        public Pair<KeyArgs, Double> next() {
            if (innerIterator.hasNext()) {
                innerIterator.advance();
                return Pair.of(innerIterator.key(), innerIterator.value());
            } else {
                return null;
            }
        }

        @Override
        public void remove() {
            innerIterator.remove();
        }
    };
}
项目:openimaj    文件:KeyedParameters.java   
@Override
public Iterator<ObjectDoubleEntry<KEY>> iterator() {
    return new Iterator<ObjectDoubleEntry<KEY>>() {
        TObjectDoubleIterator<KEY> iter = paramsMap.iterator();
        ObjectDoubleEntry<KEY> entry = new ObjectDoubleEntry<KEY>();

        @Override
        public boolean hasNext() {
            return iter.hasNext();
        }

        @Override
        public ObjectDoubleEntry<KEY> next() {
            iter.advance();
            entry.key = iter.key();
            entry.value = iter.value();
            return entry;
        }

        @Override
        public void remove() {
            throw new UnsupportedOperationException("Not supported");
        }
    };
}
项目:Conjecture    文件:StringKeyedVector.java   
/**
 * compute the inner product between this and vec.
 */
public double dot(StringKeyedVector vec) {
    if (vec instanceof LazyVector) {
        return vec.dot(this);
    }
    ByteArrayDoubleHashMap vec_small = this.size() > vec.size() ? vec.vector
            : this.vector;
    ByteArrayDoubleHashMap vec_big = this.size() > vec.size() ? this.vector
            : vec.vector;
    double res = 0.0;
    for (TObjectDoubleIterator<byte[]> it = vec_small.troveIterator(); it
            .hasNext();) {
        it.advance();
        if (vec_big.containsKey(it.key())) {
            res += it.value() * vec_big.getPrimitive(it.key());
        }
    }
    return res;
}
项目:Conjecture    文件:ByteArrayDoubleHashMap.java   
public Iterator<Map.Entry<String, Double>> iterator() {
    return new Iterator<Map.Entry<String, Double>>() {
        private TObjectDoubleIterator<byte[]> iter = troveIterator();

        public boolean hasNext() {
            return iter.hasNext();
        }

        public void remove() {
            iter.remove();
        }

        public Map.Entry<String, Double> next() {
            iter.advance();
            return new AbstractMap.SimpleImmutableEntry<String, Double>(
                    byteArrayToString(iter.key()), iter.value());
        }
    };
}
项目:xcc    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:xcc    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:java-probabilistic-earley-parser    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals(final Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    final TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        final TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            final Object key = iter.key();
            final double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( final ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:trove-3.0.3    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
@Override
@SuppressWarnings("rawtypes")
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:trove-3.0.3    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
@Override
@SuppressWarnings("rawtypes")
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec_major    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec_major    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
        logger.warn("An error occurred!", ex);
    }
    return true;
}
项目:recalot.com    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:recalot.com    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec-PoC    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec-PoC    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:Conjecture    文件:LazyVector.java   
public void delazify() {
    for (TObjectDoubleIterator<byte[]> it = vector.troveIterator(); it
            .hasNext();) {
        it.advance();
        long startIter = (long)iterations.getPrimitive(it.key()); // defaults
                                                                  // to 0.0
        if (startIter < iteration) {
            it.setValue(updater.lazyUpdate(it.key().toString(), it.value(), startIter, iteration));
            iterations.putPrimitive(it.key(), (double)iteration);
        }
    }
    removeZeroCoordinates();
}
项目:Conjecture    文件:LazyVector.java   
public void skipToIteration(long iter) {
    delazify();
    iteration = iter;
    for (TObjectDoubleIterator<byte[]> it = iterations.troveIterator(); it
            .hasNext();) {
        it.advance();
        it.setValue((double)iter);
    }
}
项目:Conjecture    文件:LazyVector.java   
/**
 * Remove zeros that may have appeared as a result of a transform
 */
public void removeZeroCoordinates() {
    for (TObjectDoubleIterator<byte[]> it = vector.troveIterator(); it
            .hasNext();) {
        it.advance();
        if (Utilities.floatingPointEquals(it.value(), 0d)) {
            iterations.removePrimitive(it.key());
            it.remove();
        }
    }
}
项目:Conjecture    文件:LazyVector.java   
protected double dotWithSKV(StringKeyedVector vec) {
    // dont figure out which ones bigger etc, since delazifying this to get
    // the size is too slow.
    double res = 0.0;
    for (TObjectDoubleIterator<byte[]> it = vec.vector.troveIterator(); it
            .hasNext();) {
        it.advance();
        res += it.value() * delazifyCoordinate(it.key());
    }
    return res;
}
项目:Conjecture    文件:StringKeyedVector.java   
/**
 * add a multiple of vec to this.
 */
public void addScaled(StringKeyedVector vec, double scale) {
    if (vec instanceof LazyVector) {
        ((LazyVector)vec).delazify();
    }
    for (TObjectDoubleIterator<byte[]> it = vec.vector.troveIterator(); it
            .hasNext();) {
        it.advance();
        addToCoordinateInternal(it.key(), scale * it.value());
    }
}
项目:Conjecture    文件:StringKeyedVector.java   
public StringKeyedVector multiplyPointwise(StringKeyedVector vec) {
    StringKeyedVector res = new StringKeyedVector();
    if (vec instanceof LazyVector) {
        ((LazyVector)vec).delazify();
    }
    for (TObjectDoubleIterator<byte[]> it = vec.vector.troveIterator(); it
            .hasNext();) {
        it.advance();
        res.vector.putPrimitive(it.key(), vector.getPrimitive(it.key())
                * it.value());
    }
    return res;
}
项目:Conjecture    文件:StringKeyedVector.java   
public StringKeyedVector projectOntoNonZeroCoordinates(StringKeyedVector vec) {
    StringKeyedVector res = new StringKeyedVector();
    if (vec instanceof LazyVector) {
        ((LazyVector)vec).delazify();
    }
    for (TObjectDoubleIterator<byte[]> it = vec.vector.troveIterator(); it
            .hasNext();) {
        it.advance();
        res.addToCoordinateInternal(it.key(), vector.getPrimitive(it.key()));
    }
    return res;
}
项目:Conjecture    文件:StringKeyedVector.java   
/**
 * Remove zeros that may have appeared as a result of a transform
 */
public void removeZeroCoordinates() {
    @SuppressWarnings("unused")
    int i = 0;
    for (TObjectDoubleIterator<byte[]> it = vector.troveIterator(); it
            .hasNext();) {
        it.advance();
        if (Utilities.floatingPointEquals(it.value(), 0d)) {
            i++;
            it.remove();
        }
    }
}
项目:Conjecture    文件:ByteArrayDoubleHashMap.java   
private void writeObject(ObjectOutputStream output) throws IOException {
    output.writeObject(keyEncoding);
    output.writeFloat(loadFactor);
    output.writeDouble(defaultValue);
    output.writeInt(map.size());
    for (TObjectDoubleIterator<byte[]> it = map.iterator(); it.hasNext();) {
        it.advance();
        byte[] key = it.key();
        output.writeInt(key.length);
        for (int i = 0; i < key.length; i++) {
            output.writeByte(key[i]);
        }
        output.writeDouble(it.value());
    }
}
项目:Conjecture    文件:ByteArrayDoubleHashMap.java   
public void write(Kryo kryo, Output output) {
    output.writeString(keyEncoding);
    output.writeFloat(loadFactor);
    output.writeDouble(defaultValue);
    output.writeInt(map.size());
    for (TObjectDoubleIterator<byte[]> it = map.iterator(); it.hasNext();) {
        it.advance();
        byte[] key = it.key();
        output.writeInt(key.length);
        for (int i = 0; i < key.length; i++) {
            output.writeByte(key[i]);
        }
        output.writeDouble(it.value());
    }
}
项目:easyrec    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec    文件:TObjectDoubleCustomHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:jasa    文件:DynamicSurplusReport.java   
public double calculateTotalEquilibriumSurplus() {
    double totalSurplus = 0;
    TObjectDoubleIterator<AbstractTradingAgent> i = surplusTable.iterator();
    while (i.hasNext()) {
        i.advance();
        @SuppressWarnings("unused")
        AbstractTradingAgent agent = i.key();
        totalSurplus += i.value();
    }
    return totalSurplus;
}
项目:RPG-Items-2    文件:TObjectDoubleHashMap.java   
/**
 * Compares this map with another map for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TObjectDoubleMap ) ) {
        return false;
    }
    TObjectDoubleMap that = ( TObjectDoubleMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TObjectDoubleIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            Object key = iter.key();
            double value = iter.value();
            if ( value == no_entry_value ) {
                if ( !( that.get( key ) == that.getNoEntryValue() &&
                 that.containsKey( key ) ) ) {

                    return false;
                }
            } else {
                if ( value != that.get( key ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:xcc    文件:TObjectDoubleHashMap.java   
/**
 * @return an iterator over the entries in this map
 */
public TObjectDoubleIterator<K> iterator() {
    return new TObjectDoubleHashIterator<K>( this );
}
项目:xcc    文件:TObjectDoubleCustomHashMap.java   
/**
 * @return an iterator over the entries in this map
 */
public TObjectDoubleIterator<K> iterator() {
    return new TObjectDoubleHashIterator<K>( this );
}
项目:HCFCore    文件:TObjectDoubleHashMap.java   
/**
 * @return an iterator over the entries in this map
 */
public TObjectDoubleIterator<K> iterator() {
    return new TObjectDoubleHashIterator<K>( this );
}
项目:HCFCore    文件:TObjectDoubleCustomHashMap.java   
/**
 * @return an iterator over the entries in this map
 */
public TObjectDoubleIterator<K> iterator() {
    return new TObjectDoubleHashIterator<K>( this );
}
项目:HCFCore    文件:TObjectDoubleHashMap.java   
/**
 * @return an iterator over the entries in this map
 */
public TObjectDoubleIterator<K> iterator() {
    return new TObjectDoubleHashIterator<K>( this );
}
项目:HCFCore    文件:TObjectDoubleCustomHashMap.java   
/**
 * @return an iterator over the entries in this map
 */
public TObjectDoubleIterator<K> iterator() {
    return new TObjectDoubleHashIterator<K>( this );
}
项目:java-probabilistic-earley-parser    文件:TObjectDoubleHashMap.java   
/**
 * @return an iterator over the entries in this map
 */
public TObjectDoubleIterator<K> iterator() {
    return new TObjectDoubleHashIterator<>(this);
}