com.datumbox.framework.core.common.dataobjects
Class MapRealVector
- java.lang.Object
-
- org.apache.commons.math3.linear.RealVector
-
- org.apache.commons.math3.linear.SparseRealVector
-
- org.apache.commons.math3.linear.OpenMapRealVector
-
- com.datumbox.framework.core.common.dataobjects.MapRealVector
-
- All Implemented Interfaces:
- java.io.Serializable
public class MapRealVector extends org.apache.commons.math3.linear.OpenMapRealVectorThe MapRealVector class is a RealVector implementation which stores the data in a Map.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description MapRealVector()Build a 0-length vector.MapRealVector(double[] values)Create from an array.MapRealVector(java.lang.Double[] values)Create from an array.MapRealVector(double[] values, double epsilon)Create from an array, specifying zero tolerance.MapRealVector(java.lang.Double[] values, double epsilon)Create from an array.MapRealVector(int dimension)Construct a vector of zeroes.MapRealVector(int dimension, double epsilon)Construct a vector of zeroes, specifying zero tolerance.MapRealVector(int dimension, int expectedSize)Build a vector with known the sparseness (for advanced use only).MapRealVector(int dimension, int expectedSize, double epsilon)Build a vector with known the sparseness and zero tolerance setting (for advanced use only).MapRealVector(MapRealVector v)Copy constructor.MapRealVector(org.apache.commons.math3.linear.OpenMapRealVector v)Copy constructor.MapRealVector(org.apache.commons.math3.linear.RealVector v)Generic copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description org.apache.commons.math3.linear.RealMatrixouterProduct(org.apache.commons.math3.linear.RealVector v)-
Methods inherited from class org.apache.commons.math3.linear.OpenMapRealVector
add, add, append, append, append, copy, dotProduct, ebeDivide, ebeMultiply, equals, getDimension, getDistance, getDistance, getEntry, getL1Distance, getL1Distance, getLInfDistance, getSparsity, getSubVector, hashCode, isInfinite, isNaN, mapAdd, mapAddToSelf, set, setEntry, setSubVector, sparseIterator, subtract, subtract, toArray, unitize, unitVector
-
Methods inherited from class org.apache.commons.math3.linear.RealVector
addToEntry, combine, combineToSelf, cosine, dotProduct, getL1Norm, getLInfNorm, getMaxIndex, getMaxValue, getMinIndex, getMinValue, getNorm, iterator, map, mapDivide, mapDivideToSelf, mapMultiply, mapMultiplyToSelf, mapSubtract, mapSubtractToSelf, mapToSelf, projection, unmodifiableRealVector, walkInDefaultOrder, walkInDefaultOrder, walkInDefaultOrder, walkInDefaultOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder
-
-
-
-
Constructor Detail
-
MapRealVector
public MapRealVector()
Build a 0-length vector.
-
MapRealVector
public MapRealVector(int dimension)
Construct a vector of zeroes.- Parameters:
dimension- Size of the vector.
-
MapRealVector
public MapRealVector(int dimension, double epsilon)Construct a vector of zeroes, specifying zero tolerance.- Parameters:
dimension- Size of the vector.epsilon- Tolerance below which a value considered zero.
-
MapRealVector
public MapRealVector(int dimension, int expectedSize)Build a vector with known the sparseness (for advanced use only).- Parameters:
dimension- Size of the vector.expectedSize- The expected number of non-zero entries.
-
MapRealVector
public MapRealVector(int dimension, int expectedSize, double epsilon)Build a vector with known the sparseness and zero tolerance setting (for advanced use only).- Parameters:
dimension- Size of the vector.expectedSize- Expected number of non-zero entries.epsilon- Tolerance below which a value is considered zero.
-
MapRealVector
public MapRealVector(double[] values)
Create from an array. Only non-zero entries will be stored.- Parameters:
values- Set of values to create from.
-
MapRealVector
public MapRealVector(double[] values, double epsilon)Create from an array, specifying zero tolerance. Only non-zero entries will be stored.- Parameters:
values- Set of values to create from.epsilon- Tolerance below which a value is considered zero.
-
MapRealVector
public MapRealVector(java.lang.Double[] values)
Create from an array. Only non-zero entries will be stored.- Parameters:
values- The set of values to create from
-
MapRealVector
public MapRealVector(java.lang.Double[] values, double epsilon)Create from an array. Only non-zero entries will be stored.- Parameters:
values- Set of values to create from.epsilon- Tolerance below which a value is considered zero.
-
MapRealVector
public MapRealVector(MapRealVector v)
Copy constructor.- Parameters:
v- Instance to copy from.
-
MapRealVector
public MapRealVector(org.apache.commons.math3.linear.OpenMapRealVector v)
Copy constructor.- Parameters:
v- Instance to copy from.
-
MapRealVector
public MapRealVector(org.apache.commons.math3.linear.RealVector v)
Generic copy constructor.- Parameters:
v- Instance to copy from.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG