private static class SimplifiedRandomHyperplaneProjectionFamily.SignedProjection extends Object implements RandomProjectionFamily.Projection
Modifier and Type | Field and Description |
---|---|
private double[] |
buf
Shared buffer to use during projections.
|
private int |
k
Output dimensionality
|
(package private) boolean[][] |
mat
Projection matrix.
|
Constructor and Description |
---|
SimplifiedRandomHyperplaneProjectionFamily.SignedProjection(int dim,
int k,
Random random)
Constructor.
|
Modifier and Type | Method and 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.
|
boolean[][] mat
private int k
private double[] buf
public SimplifiedRandomHyperplaneProjectionFamily.SignedProjection(int dim, int k, Random random)
dim
- Input dimensionalityk
- Output dimensionalityrandom
- Random generatorpublic double[] project(NumberVector in)
RandomProjectionFamily.Projection
project
in interface RandomProjectionFamily.Projection
in
- Input vectorpublic double[] project(NumberVector vec, double[] ret)
RandomProjectionFamily.Projection
project
in interface RandomProjectionFamily.Projection
vec
- Input vectorret
- Output bufferbuffer
private double[] projectDense(NumberVector in, double[] ret)
in
- Input vectorpublic int getOutputDimensionality()
RandomProjectionFamily.Projection
getOutputDimensionality
in interface RandomProjectionFamily.Projection
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.