public class KeyInterpolator extends Object
| Constructor and Description |
|---|
KeyInterpolator(BigInteger minOrd,
BigInteger maxOrd,
int count,
boolean descending) |
| Modifier and Type | Method and Description |
|---|---|
int |
getApproximateCount()
Returns an (approximate) records count.
|
int |
getApproximatePosition(BigInteger key)
Returns an (approximate) position of a key in a set using inverse
interpolation.
|
int |
getClosestPosition(int count)
The closest known position to to the given one.
|
BigInteger |
getExactPoint(int count)
Exact (not approximated) point or null if no such point exist in
approximator.
|
BigInteger |
getLeastAccurateValue()
Gets the value that corresponds to the center of the biggest gap in this
interpolation table.
|
BigInteger |
getPoint(int count)
Примерное значение первичного ключа по данному номеру.
|
int |
getPointsCount()
Количество имеющихся точек в таблице.
|
void |
resetToEmptyTable()
Resets the interpolator when all records are deleted.
|
void |
setPoint(BigInteger ord,
int count)
Установка соответствия номера записи значению первичного ключа.
|
public KeyInterpolator(BigInteger minOrd, BigInteger maxOrd, int count, boolean descending)
public void setPoint(BigInteger ord, int count)
ord - Порядковое значение первичного ключа.count - Номер записи.public BigInteger getExactPoint(int count)
count - Record's number.public int getClosestPosition(int count)
count - The ordinal number of record.public BigInteger getPoint(int count)
count - Номер записи.public int getPointsCount()
public int getApproximateCount()
public int getApproximatePosition(BigInteger key)
key - Key ordinal value.public BigInteger getLeastAccurateValue()
Returns null if there is no gap big enough.
public void resetToEmptyTable()
Copyright © 2019 CURS. All rights reserved.