Module org.elasticsearch.tdigest
Package org.elasticsearch.tdigest.arrays
Interface TDigestDoubleArray
- All Superinterfaces:
org.apache.lucene.util.Accountable,AutoCloseable,Closeable,Releasable
Minimal interface for DoubleArray-like classes used within TDigest.
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double value) voidensureCapacity(int requiredCapacity) doubleget(int index) voidresize(int newSize) Resizes the array.voidset(int index, double value) default voidset(int index, TDigestDoubleArray buf, int offset, int len) Copieslenelements frombufto this array.intsize()voidsort()Sorts the array in place in ascending order.Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources, ramBytesUsedMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
size
int size() -
get
double get(int index) -
set
void set(int index, double value) -
add
void add(double value) -
ensureCapacity
void ensureCapacity(int requiredCapacity) -
resize
void resize(int newSize) Resizes the array. If the new size is bigger than the current size, the new elements are set to 0. -
set
Copieslenelements frombufto this array. -
sort
void sort()Sorts the array in place in ascending order.
-