V - the dictionary vector type.public class SearchTreeBasedDictionaryBuilder<V extends ValueVector> extends Object implements DictionaryBuilder<V>
| Modifier and Type | Field and Description |
|---|---|
protected VectorValueComparator<V> |
comparator
The criteria for sorting in the search tree.
|
| Constructor and Description |
|---|
SearchTreeBasedDictionaryBuilder(V dictionary,
VectorValueComparator<V> comparator)
Construct a search tree-based dictionary builder.
|
SearchTreeBasedDictionaryBuilder(V dictionary,
VectorValueComparator<V> comparator,
boolean encodeNull)
Construct a search tree-based dictionary builder.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addValue(V targetVector,
int targetIndex)
Try to add an element from the target vector to the dictionary.
|
int |
addValues(V targetVector)
Try to add all values from the target vector to the dictionary.
|
V |
getDictionary()
Gets the dictionary built.
|
void |
populateSortedDictionary(V sortedDictionary)
Gets the sorted dictionary.
|
protected final VectorValueComparator<V extends ValueVector> comparator
public SearchTreeBasedDictionaryBuilder(V dictionary, VectorValueComparator<V> comparator)
dictionary - the dictionary vector.comparator - the criteria for value equality.public SearchTreeBasedDictionaryBuilder(V dictionary, VectorValueComparator<V> comparator, boolean encodeNull)
dictionary - the dictionary vector.comparator - the criteria for value equality.encodeNull - if null values should be added to the dictionary.public V getDictionary()
populateSortedDictionary(ValueVector).getDictionary in interface DictionaryBuilder<V extends ValueVector>public int addValues(V targetVector)
addValues in interface DictionaryBuilder<V extends ValueVector>targetVector - the target vector containing values to probe.public int addValue(V targetVector, int targetIndex)
addValue in interface DictionaryBuilder<V extends ValueVector>targetVector - the target vector containing new element.targetIndex - the index of the new element in the target vector.public void populateSortedDictionary(V sortedDictionary)
Copyright © 2024 The Apache Software Foundation. All rights reserved.