Package gnu.trove.list.array

Examples of gnu.trove.list.array.TIntArrayList


     * @param initialCapacity an <code>int</code> value
     * @return an <code>int</code> value
     */
    @Override
    public int setUp(int initialCapacity) {
        order = new TIntArrayList(initialCapacity) {
            /**
             * Grow the internal array as needed to accommodate the specified number of elements.
             * The size of the array bytes on each resize unless capacity requires more than twice
             * the current capacity.
             */
 
View Full Code Here


     * specified capacity.
     *
     * @param capacity the initial depth of the stack
     */
    public TIntArrayStack( int capacity ) {
        _list = new TIntArrayList( capacity );
    }
View Full Code Here

     *
     * @param capacity the initial depth of the stack
     * @param no_entry_value value that represents null
     */
    public TIntArrayStack( int capacity, int no_entry_value ) {
        _list = new TIntArrayList( capacity, no_entry_value );
    }
View Full Code Here

     * @param stack the instance to copy
     */
    public TIntArrayStack( TIntStack stack ) {
        if ( stack instanceof TIntArrayStack ) {
            TIntArrayStack array_stack = ( TIntArrayStack ) stack;
            this._list = new TIntArrayList( array_stack._list );
        } else {
            throw new UnsupportedOperationException( "Only support TIntArrayStack" );
        }
    }
View Full Code Here

    if (!_existIndexes) {
      tuplesToJoin.copy(oppositeStorage);
      return;
    }

    final TIntArrayList rowIds = new TIntArrayList();
    // If there is atleast one index (so we have single join conditions with
    // 1 index per condition)
    // Get the row indices in the storage of the opposite relation that
    // satisfy each join condition (equijoin / inequality)
    // Then take the intersection of the returned row indices since each
    // join condition
    // is separated by AND

    for (int i = 0; i < oppositeIndexes.size(); i++) {
      TIntArrayList currentRowIds = null;

      final Index currentOpposIndex = oppositeIndexes.get(i);
      final String value = valuesToApplyOnIndex.get(i);

      int currentOperator = _operatorForIndexes.get(i);
View Full Code Here

      boolean isFromFirstEmitter, List<String> valuesToApplyOnIndex, TupleStorage tuplesToJoin) {
    if (!_existIndexes) {
      tuplesToJoin.copy(oppositeStorage);
      return;
    }
    final TIntArrayList rowIds = new TIntArrayList();
    // If there is atleast one index (so we have single join conditions with
    // 1 index per condition)
    // Get the row indices in the storage of the opposite relation that
    // satisfy each join condition (equijoin / inequality)
    // Then take the intersection of the returned row indices since each
    // join condition
    // is separated by AND

    for (int i = 0; i < oppositeIndexes.size(); i++) {
      TIntArrayList currentRowIds = null;

      final Index currentOpposIndex = oppositeIndexes.get(i);
      final String value = valuesToApplyOnIndex.get(i);

      int currentOperator = _operatorForIndexes.get(i);
View Full Code Here

    if (!_existIndexes) {
      tuplesToJoin.copy(oppositeStorage);
      return;
    }

    final TIntArrayList rowIds = new TIntArrayList();
    // If there is atleast one index (so we have single join conditions with
    // 1 index per condition)
    // Get the row indices in the storage of the opposite relation that
    // satisfy each join condition (equijoin / inequality)
    // Then take the intersection of the returned row indices since each
    // join condition
    // is separated by AND
    for (int i = 0; i < oppositeIndexes.size(); i++) {
      TIntArrayList currentRowIds = null;
      final Index currentOpposIndex = oppositeIndexes.get(i);
      final String value = valuesToApplyOnIndex.get(i);
      int currentOperator = _operatorForIndexes.get(i);
      // Switch inequality operator if the tuple coming is from the other
      // relation
View Full Code Here

    bbt.put(6, 6);
    bbt.put(2, 1);
    bbt.put(5, 5);
    bbt.put(9, 1);

    final TIntArrayList list = bbt.getValues(ComparisonPredicate.NONLESS_OP, 5);
    for (int i = 0; i < list.size(); i++)
      LOG.info(list.get(i));

  }
View Full Code Here

    _index = new TreeMap<KeyType, TIntArrayList>();
  }

  private TIntArrayList flatten(Collection<TIntArrayList> sets) {

    final TIntArrayList result = new TIntArrayList();
    for (final Iterator iterator = sets.iterator(); iterator.hasNext();) {
      final TIntArrayList tIntArrayList = (TIntArrayList) iterator.next();
      result.addAll(tIntArrayList);
    }
    return result;
  }
View Full Code Here

  }

  @Override
  public void put(Integer row_id, KeyType key) {

    TIntArrayList idsList = _index.get(key);
    if (idsList == null) {
      idsList = new TIntArrayList(1);
      _index.put(key, idsList);

    }
    idsList.add(row_id);

  }
View Full Code Here

TOP

Related Classes of gnu.trove.list.array.TIntArrayList

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.