/** * Creates a new tree map using the elements of two parallel arrays and the * given comparator. * * @param k * the array of keys of the new tree map. * @param v * the array of corresponding values in the new tree map. * @param c * a (possibly type-specific) comparator. * @throws IllegalArgumentException * if {@code k} and {@code v} have different lengths. */ public Int2IntRBTreeMap(final int[] k, final int v[], final Comparator<? super Integer> c) { this(c); if (k.length != v.length) throw new IllegalArgumentException( "The key array and the value array have different lengths (" + k.length + " and " + v.length + ")"); for (int i = 0; i < k.length; i++) this.put(k[i], v[i]); } /**
@Override public int put(final int k, final int v) { modified = false; if (!in(k)) throw new IllegalArgumentException("Key (" + k + ") out of range [" + (bottom ? "-" : String.valueOf(from)) + ", " + (top ? "-" : String.valueOf(to)) + ")"); final int oldValue = Int2IntRBTreeMap.this.put(k, v); return modified ? this.defRetValue : oldValue; } @Override
td.clear(); tryTower( quantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );
td.clear(); tryTower( quantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );
td.clear(); tryTower( quantumBitLength, positionsQuantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );
td.clear(); tryTower( quantumBitLength, positionsQuantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );
td.clear(); tryTower( quantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );
td.clear(); tryTower( quantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );
td.clear(); tryTower( quantumBitLength, positionsQuantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );
td.clear(); tryTower( quantumBitLength, positionsQuantumBitLength, entryBitLength, toTheEnd, cacheSkipBitCount, td, false ); candidates.put( (int)( td.bitsForTowers() / td.numberOfEntries() ), entryBitLength );