void clearSelf() { reset(null, null, null, null); Arrays.fill(buildKeys, 0, maxBuildKeyPosition, null); Arrays.fill(buildChildren, 0, maxBuildKeyPosition + 1, null); maxBuildKeyPosition = 0; }
void clearSelf() { reset(null, null, null, null); Arrays.fill(buildKeys, 0, maxBuildKeyPosition, null); Arrays.fill(buildChildren, 0, maxBuildKeyPosition + 1, null); maxBuildKeyPosition = 0; }
void clearSelf() { reset(null, null, null, null); Arrays.fill(buildKeys, 0, maxBuildKeyPosition, null); Arrays.fill(buildChildren, 0, maxBuildKeyPosition + 1, null); maxBuildKeyPosition = 0; }
void clearSelf() { reset(null, null, null, null); Arrays.fill(buildKeys, 0, maxBuildKeyPosition, null); Arrays.fill(buildChildren, 0, maxBuildKeyPosition + 1, null); maxBuildKeyPosition = 0; }
void clearSelf() { reset(null, null, null, null); Arrays.fill(buildKeys, 0, maxBuildKeyPosition, null); Arrays.fill(buildChildren, 0, maxBuildKeyPosition + 1, null); maxBuildKeyPosition = 0; }
private NodeBuilder ensureParent() { if (parent == null) { parent = new NodeBuilder(); parent.child = this; } if (parent.upperBound == null) parent.reset(EMPTY_BRANCH, upperBound, updateFunction, comparator); return parent; }
private NodeBuilder ensureParent() { if (parent == null) { parent = new NodeBuilder(); parent.child = this; } if (parent.upperBound == null) parent.reset(EMPTY_BRANCH, upperBound, updateFunction, comparator); return parent; }
private NodeBuilder ensureParent() { if (parent == null) { parent = new NodeBuilder(); parent.child = this; } if (parent.upperBound == null) parent.reset(EMPTY_BRANCH, upperBound, updateFunction, comparator); return parent; }
private NodeBuilder ensureParent() { if (parent == null) { parent = new NodeBuilder(); parent.child = this; } if (parent.upperBound == null) parent.reset(EMPTY_BRANCH, upperBound, updateFunction, comparator); return parent; }
private NodeBuilder ensureParent() { if (parent == null) { parent = new NodeBuilder(); parent.child = this; } if (parent.upperBound == null) parent.reset(EMPTY_BRANCH, upperBound, updateFunction, comparator); return parent; }
public <V> Object[] build(Iterable<V> source, UpdateFunction<V> updateF, int size) { assert updateF != null; NodeBuilder current = rootBuilder; // we descend only to avoid wasting memory; in update() we will often descend into existing trees // so here we want to descend also, so we don't have lg max(N) depth in both directions while ((size >>= FAN_SHIFT) > 0) current = current.ensureChild(); current.reset(EMPTY_LEAF, POSITIVE_INFINITY, updateF, null); for (V key : source) current.addNewKey(key); current = current.ascendToRoot(); Object[] r = current.toNode(); current.clear(); return r; } }
public <C, K extends C, V extends C> Object[] build(Iterable<K> source, UpdateFunction<K, V> updateF, int size) { assert updateF != null; NodeBuilder current = rootBuilder; // we descend only to avoid wasting memory; in update() we will often descend into existing trees // so here we want to descend also, so we don't have lg max(N) depth in both directions while ((size >>= FAN_SHIFT) > 0) current = current.ensureChild(); current.reset(EMPTY_LEAF, POSITIVE_INFINITY, updateF, null); for (K key : source) current.addNewKey(key); current = current.ascendToRoot(); Object[] r = current.toNode(); current.clear(); builderRecycler.recycle(this, recycleHandle); return r; } }
public <C, K extends C, V extends C> Object[] build(Iterable<K> source, UpdateFunction<K, V> updateF, int size) { assert updateF != null; NodeBuilder current = rootBuilder; // we descend only to avoid wasting memory; in update() we will often descend into existing trees // so here we want to descend also, so we don't have lg max(N) depth in both directions while ((size >>= FAN_SHIFT) > 0) current = current.ensureChild(); current.reset(EMPTY_LEAF, POSITIVE_INFINITY, updateF, null); for (K key : source) current.addNewKey(key); current = current.ascendToRoot(); Object[] r = current.toNode(); current.clear(); builderRecycler.recycle(this, recycleHandle); return r; } }
public <C, K extends C, V extends C> Object[] build(Iterable<K> source, UpdateFunction<K, V> updateF, int size) { assert updateF != null; NodeBuilder current = rootBuilder; // we descend only to avoid wasting memory; in update() we will often descend into existing trees // so here we want to descend also, so we don't have lg max(N) depth in both directions while ((size >>= FAN_SHIFT) > 0) current = current.ensureChild(); current.reset(EMPTY_LEAF, POSITIVE_INFINITY, updateF, null); for (K key : source) current.addNewKey(key); current = current.ascendToRoot(); Object[] r = current.toNode(); current.clear(); builderRecycler.recycle(this, recycleHandle); return r; } }
public <C, K extends C, V extends C> Object[] build(Iterable<K> source, UpdateFunction<K, V> updateF, int size) { assert updateF != null; NodeBuilder current = rootBuilder; // we descend only to avoid wasting memory; in update() we will often descend into existing trees // so here we want to descend also, so we don't have lg max(N) depth in both directions while ((size >>= FAN_SHIFT) > 0) current = current.ensureChild(); current.reset(EMPTY_LEAF, POSITIVE_INFINITY, updateF, null); for (K key : source) current.addNewKey(key); current = current.ascendToRoot(); Object[] r = current.toNode(); current.clear(); builderRecycler.recycle(this, recycleHandle); return r; } }
current.reset(btree, POSITIVE_INFINITY, updateF, comparator);
current.reset(btree, POSITIVE_INFINITY, updateF, comparator);
current.reset(btree, POSITIVE_INFINITY, updateF, comparator);
current.reset(btree, POSITIVE_INFINITY, updateF, comparator);
current.reset(btree, POSITIVE_INFINITY, updateF, comparator);