Package elki.data.projection.random
Class SimplifiedRandomHyperplaneProjectionFamily.SignedProjection
- java.lang.Object
-
- elki.data.projection.random.SimplifiedRandomHyperplaneProjectionFamily.SignedProjection
-
- All Implemented Interfaces:
RandomProjectionFamily.Projection
- Enclosing class:
- SimplifiedRandomHyperplaneProjectionFamily
private static class SimplifiedRandomHyperplaneProjectionFamily.SignedProjection extends java.lang.Object implements RandomProjectionFamily.Projection
Fast projection class, using booleans to represent +-1 matrix entries. Optimized for sparse multiplications, thus we are using a column-row layout.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description SignedProjection(int dim, int k, java.util.Random random)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOutputDimensionality()
Get the output dimensionality.double[]
project(NumberVector in)
Project a single vector.double[]
project(NumberVector vec, double[] ret)
Project a single vector, into the given buffer.private double[]
projectDense(NumberVector in, double[] ret)
Slower version, for dense multiplication.
-
-
-
Method Detail
-
project
public double[] project(NumberVector in)
Description copied from interface:RandomProjectionFamily.Projection
Project a single vector.- Specified by:
project
in interfaceRandomProjectionFamily.Projection
- Parameters:
in
- Input vector- Returns:
- Projected vector
-
project
public double[] project(NumberVector vec, double[] ret)
Description copied from interface:RandomProjectionFamily.Projection
Project a single vector, into the given buffer.- Specified by:
project
in interfaceRandomProjectionFamily.Projection
- Parameters:
vec
- Input vectorret
- Output buffer- Returns:
buffer
-
projectDense
private double[] projectDense(NumberVector in, double[] ret)
Slower version, for dense multiplication.- Parameters:
in
- Input vector- Returns:
- Projected data.
-
getOutputDimensionality
public int getOutputDimensionality()
Description copied from interface:RandomProjectionFamily.Projection
Get the output dimensionality.- Specified by:
getOutputDimensionality
in interfaceRandomProjectionFamily.Projection
- Returns:
- Output dimensionality
-
-