private static class SimplifiedRandomHyperplaneProjectionFamily.SignedProjection extends java.lang.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 |
---|
SignedProjection(int dim,
int k,
java.util.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 SignedProjection(int dim, int k, java.util.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 © 2019 ELKI Development Team. License information.