Package gnu.trove.iterator

Examples of gnu.trove.iterator.TIntIterator


            indexes.sort();

            int start = data.size();
            indexer.put(vecid, start);
            lengths.put(vecid, indexes.size() * 2);
            TIntIterator iter = indexes.iterator();
            if (max < accumuFactor * sparseFactor) {
                while (iter.hasNext()) {
                    int key = iter.next();
                    float value = results.get(key);
                    data.add(key);
                    data.add(value);
                }
            } else {
                while (iter.hasNext()) {
                    int key = iter.next();
                    float value = results.get(key) * accumuFactor / max;
                    data.add(key);
                    data.add(value);
                }
            }
View Full Code Here


        /** {@inheritDoc} */
        public boolean containsAll( TIntCollection collection ) {
            if ( collection == this ) {
                return true;
            }
            TIntIterator iter = collection.iterator();
            while ( iter.hasNext() ) {
                if ( ! TIntObjectHashMap.this.containsKey( iter.next() ) ) {
                    return false;
                }
            }
            return true;
        }
View Full Code Here

        }

        /** {@inheritDoc} */
        public boolean retainAll( Collection<?> collection ) {
            boolean modified = false;
            TIntIterator iter = iterator();
            while ( iter.hasNext() ) {
                //noinspection SuspiciousMethodCalls
                if ( ! collection.contains( Integer.valueOf ( iter.next() ) ) ) {
                    iter.remove();
                    modified = true;
                }
            }
            return modified;
        }
View Full Code Here

        public boolean retainAll( TIntCollection collection ) {
            if ( this == collection ) {
                return false;
            }
            boolean modified = false;
            TIntIterator iter = iterator();
            while ( iter.hasNext() ) {
                if ( ! collection.contains( iter.next() ) ) {
                    iter.remove();
                    modified = true;
                }
            }
            return modified;
        }
View Full Code Here

            if ( collection == this ) {
                clear();
                return true;
            }
            boolean changed = false;
            TIntIterator iter = collection.iterator();
            while ( iter.hasNext() ) {
                int element = iter.next();
                if ( remove( element ) ) {
                    changed = true;
                }
            }
            return changed;
View Full Code Here

    }


    /** {@inheritDoc} */
    public boolean containsAll( TIntCollection collection ) {
        TIntIterator iter = collection.iterator();
        while ( iter.hasNext() ) {
            int element = iter.next();
            if ( ! contains( element ) ) {
                return false;
            }
        }
        return true;
View Full Code Here


    /** {@inheritDoc} */
    public boolean addAll( TIntCollection collection ) {
        boolean changed = false;
        TIntIterator iter = collection.iterator();
        while ( iter.hasNext() ) {
            int element = iter.next();
            if ( add( element ) ) {
                changed = true;
            }
        }
        return changed;
View Full Code Here

    /** {@inheritDoc} */
    @SuppressWarnings({"SuspiciousMethodCalls"})
    public boolean retainAll( Collection<?> collection ) {
        boolean modified = false;
      TIntIterator iter = iterator();
      while ( iter.hasNext() ) {
          if ( ! collection.contains( Integer.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
          }
      }
      return modified;
    }
View Full Code Here

    public boolean retainAll( TIntCollection collection ) {
        if ( this == collection ) {
            return false;
        }
        boolean modified = false;
      TIntIterator iter = iterator();
      while ( iter.hasNext() ) {
          if ( ! collection.contains( iter.next() ) ) {
            iter.remove();
            modified = true;
          }
      }
      return modified;
    }
View Full Code Here


    /** {@inheritDoc} */
    public boolean removeAll( TIntCollection collection ) {
        boolean changed = false;
        TIntIterator iter = collection.iterator();
        while ( iter.hasNext() ) {
            int element = iter.next();
            if ( remove( element ) ) {
                changed = true;
            }
        }
        return changed;
View Full Code Here

TOP

Related Classes of gnu.trove.iterator.TIntIterator

Copyright © 2018 www.massapicom. 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.