Class/Object

org.apache.flink.ml.math

SparseVector

Related Docs: object SparseVector | package math

Permalink

case class SparseVector(size: Int, indices: Array[Int], data: Array[Double]) extends Vector with Serializable with Product

Sparse vector implementation storing the data in two arrays. One index contains the sorted indices of the non-zero vector entries and the other the corresponding vector entries

Linear Supertypes
Product, Equals, Vector, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparseVector
  2. Product
  3. Equals
  4. Vector
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SparseVector(size: Int, indices: Array[Int], data: Array[Double])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(index: Int): Double

    Permalink

    Element wise access function

    Element wise access function

    * @param index index of the accessed element

    index

    index of the accessed element

    returns

    element with index

    Definition Classes
    SparseVectorVector
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def copy: SparseVector

    Permalink

    Copies the vector instance

    Copies the vector instance

    returns

    Copy of the SparseVector instance

    Definition Classes
    SparseVectorVector
  8. val data: Array[Double]

    Permalink
  9. def dot(other: Vector): Double

    Permalink

    Returns the dot product of the recipient and the argument

    Returns the dot product of the recipient and the argument

    other

    a Vector

    returns

    a scalar double of dot product

    Definition Classes
    SparseVectorVector
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    SparseVector → Equals → AnyRef → Any
  12. def equalsVector(vector: Vector): Boolean

    Permalink
    Definition Classes
    Vector
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    SparseVector → AnyRef → Any
  16. val indices: Array[Int]

    Permalink
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def magnitude: Double

    Permalink

    Magnitude of a vector

    Magnitude of a vector

    returns

    The length of the vector

    Definition Classes
    SparseVectorVector
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def outer(other: Vector): SparseMatrix

    Permalink

    Returns the outer product (a.k.a.

    Returns the outer product (a.k.a. Kronecker product) of this with other. The result is given in SparseMatrix representation.

    other

    a Vector

    returns

    the SparseMatrix which equals the outer product of this with other.

    Definition Classes
    SparseVectorVector
  23. val size: Int

    Permalink

    Number of elements in a vector

    Number of elements in a vector

    returns

    The number of elements of the vector

    Definition Classes
    SparseVectorVector
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toDenseVector: DenseVector

    Permalink

    Converts the SparseVector to a DenseVector

    Converts the SparseVector to a DenseVector

    returns

    The DenseVector out of the SparseVector

  26. def toString(): String

    Permalink
    Definition Classes
    SparseVector → AnyRef → Any
  27. def update(index: Int, value: Double): Unit

    Permalink

    Updates the element at the given index with the provided value

    Updates the element at the given index with the provided value

    index

    Index whose value is updated.

    value

    The value used to update the index.

    Definition Classes
    SparseVectorVector
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Product

Inherited from Equals

Inherited from Vector

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped