Package elki.index.vafile
Class VectorApproximation
- java.lang.Object
-
- elki.index.vafile.VectorApproximation
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int[]
approximation
approximation (va cell ids)(package private) int
id
Object id.
-
Constructor Summary
Constructors Constructor Description VectorApproximation(DBIDRef id, int[] approximation)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
byteOnDisk(int numberOfDimensions, int numberOfPartitions)
Computes IO costs (in bytes) needed for reading the candidates.int
getApproximation(int dim)
Get the VA approximationint
getDimensionality()
Get the dimensionalityint
internalGetIndex()
Internal only: Get the internal index.java.lang.String
toString()
-
-
-
Constructor Detail
-
VectorApproximation
public VectorApproximation(DBIDRef id, int[] approximation)
Constructor.- Parameters:
id
- Object represented (may benull
for query objects)approximation
- Approximation
-
-
Method Detail
-
getDimensionality
public int getDimensionality()
Get the dimensionality- Returns:
- Dimensionality
-
getApproximation
public int getApproximation(int dim)
Get the VA approximation- Parameters:
dim
- Dimension- Returns:
- Bin number
-
internalGetIndex
public int internalGetIndex()
Description copied from interface:DBIDRef
Internal only: Get the internal index.NOT FOR PUBLIC USE - ELKI Optimization engine only.
- Specified by:
internalGetIndex
in interfaceDBIDRef
- Returns:
- Internal index
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
byteOnDisk
public static int byteOnDisk(int numberOfDimensions, int numberOfPartitions)
Computes IO costs (in bytes) needed for reading the candidates. For one object, log2(numberOfPartitions) bits have to be read per dimension.- Parameters:
numberOfDimensions
- the number of relevant dimensionsnumberOfPartitions
- the number of relevant partitions- Returns:
- the cost values (in bytes)
-
-