public static class AbstractRandomProjectionFamily.MatrixProjection extends java.lang.Object implements RandomProjectionFamily.Projection
Modifier and Type | Field and Description |
---|---|
private double[] |
buf
Shared buffer to use during projections.
|
(package private) double[][] |
matrix
Projection matrix.
|
Constructor and Description |
---|
MatrixProjection(double[][] matrix)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getOutputDimensionality()
Get the output dimensionality.
|
double[] |
project(NumberVector in)
Project a single vector.
|
double[] |
project(NumberVector in,
double[] ret)
Project a single vector, into the given buffer.
|
private double[] |
projectSparse(SparseNumberVector in,
double[] ret)
Project, exploiting sparsity; but the transposed matrix layout would have
been better.
|
double[][] matrix
private double[] buf
public MatrixProjection(double[][] matrix)
matrix
- Projection matrix ([output dim][input dim]).public double[] project(NumberVector in)
RandomProjectionFamily.Projection
project
in interface RandomProjectionFamily.Projection
in
- Input vectorpublic double[] project(NumberVector in, double[] ret)
RandomProjectionFamily.Projection
project
in interface RandomProjectionFamily.Projection
in
- Input vectorret
- Output bufferbuffer
private double[] projectSparse(SparseNumberVector in, double[] ret)
in
- Input vectorret
- Projection bufferpublic int getOutputDimensionality()
RandomProjectionFamily.Projection
getOutputDimensionality
in interface RandomProjectionFamily.Projection
Copyright © 2019 ELKI Development Team. License information.