public class SparseVectorFactoryMTJ extends SparseVectorFactory<SparseVector>
| Modifier and Type | Field and Description |
|---|---|
static SparseVectorFactoryMTJ |
INSTANCE
Default instance of this
|
DEFAULT_DENSE_INSTANCE, DEFAULT_SPARSE_INSTANCE| Constructor and Description |
|---|
SparseVectorFactoryMTJ()
Creates a new instance of SparseVectorFactoryMTJ
|
| Modifier and Type | Method and Description |
|---|---|
SparseVector |
copyVector(Vector m)
Creates a deep copy new Vector given another, argument is unchanged
|
SparseVector |
createVector(int dim)
Creates an empty Vector of the specified dimension, all elements
must be all zeros!
|
Vector1D |
createVector1D(double x)
Creates a one-dimensional vector with the given x coordinate: (x).
|
Vector2 |
createVector2D(double x,
double y)
Creates a two-dimensional vector with the given x and y coordinates:
(x, y).
|
Vector3 |
createVector3D(double x,
double y,
double z)
Creates a three-dimensional vector with the given x, y, and z
coordinates: (x, y, z).
|
SparseVector |
createVectorCapacity(int dimensionality,
int initialCapacity)
Creates a new, empty vector with the given dimensionality and expected
number of nonzero elements.
|
SparseVector |
createWrapper(no.uib.cipr.matrix.sparse.SparseVector internalVector)
Creates a new wrapper for a sparse MTJ vector.
|
MatrixFactory<?> |
getAssociatedMatrixFactory()
Gets the matrix factory implementation associated with this vector
factory.
|
getDefaultcopyArray, copyArray, copyMap, copyValues, copyValues, createGaussianRandom, createUniformRandom, createUniformRandom, createVector, createVector1D, createVector2D, createVector3D, getDenseDefault, getSparseDefaultpublic static final SparseVectorFactoryMTJ INSTANCE
public SparseVectorFactoryMTJ()
public SparseVector copyVector(Vector m)
VectorFactorycopyVector in class VectorFactory<SparseVector>m - Vector to copypublic SparseVector createVector(int dim)
VectorFactorycreateVector in class VectorFactory<SparseVector>dim - number of elements in the Vectorpublic SparseVector createVectorCapacity(int dimensionality, int initialCapacity)
VectorFactorycreateVectorCapacity in class VectorFactory<SparseVector>dimensionality - The dimensionality for the vector to create.initialCapacity - The expected initial number of nonzero elements of the vector to
create.public Vector1D createVector1D(double x)
VectorFactorycreateVector1D in class VectorFactory<SparseVector>x - The x coordinate.public Vector2 createVector2D(double x, double y)
VectorFactorycreateVector2D in class VectorFactory<SparseVector>x - The x coordinate.y - The y coordinate.public Vector3 createVector3D(double x, double y, double z)
VectorFactorycreateVector3D in class VectorFactory<SparseVector>x - The x coordinate.y - The y coordinate.z - The z coordinate.public SparseVector createWrapper(no.uib.cipr.matrix.sparse.SparseVector internalVector)
internalVector - The MTJ vector to wrap.public MatrixFactory<?> getAssociatedMatrixFactory()
VectorFactorygetAssociatedMatrixFactory in class VectorFactory<SparseVector>