public static class AbstractRandomProjectionFamily.MatrixProjection extends 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 |
---|
AbstractRandomProjectionFamily.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 AbstractRandomProjectionFamily.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 © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.