类 OpenMapRealVector

所有已实现的接口:
Serializable

public class OpenMapRealVector extends SparseRealVector implements Serializable
This class implements the RealVector interface with a OpenIntToDoubleHashMap backing store.

注意:此实现假定对于任何 x,等式 x * 0d == 0d 成立。但对于 NaN 不成立。此外,零条目将失去其符号。因此,某些操作(涉及 NaN 和/或无穷大)可能会产生不正确的结果,如乘法、除法或函数映射。

另请参阅:
  • 字段详细资料

    • DEFAULT_ZERO_TOLERANCE

      public static final double DEFAULT_ZERO_TOLERANCE
      Default Tolerance for having a value considered zero.
      另请参阅:
  • 构造器详细资料

    • OpenMapRealVector

      public OpenMapRealVector()
      Build a 0-length vector. Zero-length vectors may be used to initialized construction of vectors by data gathering. We start with zero-length and use either the OpenMapRealVector(OpenMapRealVector, int) constructor or one of the append method (append(double), append(RealVector)) to gather data into this vector.
    • OpenMapRealVector

      public OpenMapRealVector(int dimension)
      Construct a vector of zeroes.
      参数:
      dimension - Size of the vector.
    • OpenMapRealVector

      public OpenMapRealVector(int dimension, double epsilon)
      Construct a vector of zeroes, specifying zero tolerance.
      参数:
      dimension - Size of the vector.
      epsilon - Tolerance below which a value considered zero.
    • OpenMapRealVector

      protected OpenMapRealVector(OpenMapRealVector v, int resize)
      Build a resized vector, for use with append.
      参数:
      v - Original vector.
      resize - Amount to add.
    • OpenMapRealVector

      public OpenMapRealVector(int dimension, int expectedSize)
      Build a vector with known the sparseness (for advanced use only).
      参数:
      dimension - Size of the vector.
      expectedSize - The expected number of non-zero entries.
    • OpenMapRealVector

      public OpenMapRealVector(int dimension, int expectedSize, double epsilon)
      Build a vector with known the sparseness and zero tolerance setting (for advanced use only).
      参数:
      dimension - Size of the vector.
      expectedSize - Expected number of non-zero entries.
      epsilon - Tolerance below which a value is considered zero.
    • OpenMapRealVector

      public OpenMapRealVector(double[] values)
      Create from an array. Only non-zero entries will be stored.
      参数:
      values - Set of values to create from.
    • OpenMapRealVector

      public OpenMapRealVector(double[] values, double epsilon)
      Create from an array, specifying zero tolerance. Only non-zero entries will be stored.
      参数:
      values - Set of values to create from.
      epsilon - Tolerance below which a value is considered zero.
    • OpenMapRealVector

      public OpenMapRealVector(Double[] values)
      Create from an array. Only non-zero entries will be stored.
      参数:
      values - The set of values to create from
    • OpenMapRealVector

      public OpenMapRealVector(Double[] values, double epsilon)
      Create from an array. Only non-zero entries will be stored.
      参数:
      values - Set of values to create from.
      epsilon - Tolerance below which a value is considered zero.
    • OpenMapRealVector

      public OpenMapRealVector(OpenMapRealVector v)
      Copy constructor.
      参数:
      v - Instance to copy from.
    • OpenMapRealVector

      public OpenMapRealVector(RealVector v)
      Generic copy constructor.
      参数:
      v - Instance to copy from.
  • 方法详细资料