Packages

  • package root
    Definition Classes
    root
  • package de
    Definition Classes
    root
  • package h2b
    Definition Classes
    de
  • package scala
    Definition Classes
    h2b
  • package lib
    Definition Classes
    scala
  • package math
    Definition Classes
    lib
  • package linalg

    LinAlg provides data types and operations for algebraic vectors and matrices.

    LinAlg provides data types and operations for algebraic vectors and matrices.

    Vector and Matrix elements can be of arbitrary type, provided that a factory for that element type is available. Currently, factories exist for Double, Float, Long, Int, Short, Byte and Char.

    Vector and matrix (row and column) indices can be any integer (to state more precisely, an index must be in the interval [Mindex, Maxdex], as defined in the Index object). But only elements corresponding to a subset of that whole integer range actually are stored (the concrete elements), while all other elements by definition are zero (virtual elements).

    This concept (which I got to value a long time ago with the ALGOL68 library prelude TORRIX [1]) does not only provide a natural approach to operations with vectors and matrixes of different index ranges, but also prevents from index-out-of-bounds exceptions.

    Concrete index ranges (those indices that correspond to concrete elements) implicitly or explicitly are assigned when a vector or matrix is created. By default, it starts at 1 and extends to the number of elements specified, but this is customizable.

    Vectors and Matrixes both are immutable by design, so there exist no update methods or the like (you cannot do v(i) = something). There are, however, builder classes that allow you to build Vectors and Matrixes element by element.

    Currently, operations on vectors and matrices require identical element types. For instance, you can add a Vector[Int] to another Vector[Int], but you cannot add a Vector[Int] to another Vector[Double].

    Definition Classes
    math
    See also

    [1] S. G. van der Meulen, P. Kühling, "Programmieren in ALGOL68", Bd. II (Berlin, New York: de Gruyter), 149-188 (1977)

  • package building

    Vector and matrix builders.

    Vector and matrix builders.

    Definition Classes
    linalg
    Since

    3.0.0

  • DefaultMatrixBuilder
  • DefaultVectorBuilder
  • MatrixBuilder
  • MatrixCanBuildFrom
  • SparseMatrixBuilder
  • SparseVectorBuilder
  • VectorBuilder
  • VectorCanBuildFrom
c

de.h2b.scala.lib.math.linalg.building

SparseVectorBuilder

class SparseVectorBuilder[E] extends VectorBuilder[E, SparseVector[E]]

Since

3.0.0

Note

It is unfortunate inheriting the elems array which is useless here, but we keep the super trait as it was before for compatibility reasons.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparseVectorBuilder
  2. VectorBuilder
  3. Builder
  4. Growable
  5. Clearable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++=(xs: TraversableOnce[E]): SparseVectorBuilder.this.type
    Definition Classes
    Growable
  4. def +=(x: E): SparseVectorBuilder.this.type

    Sets the element to the given value which index is defined by:

    Sets the element to the given value which index is defined by:

    - the default start index 1 (if nothing of the following applies) or

    - the next index following the last update operation.

    In all cases, an already existing value at this index will be overridden.

    Definition Classes
    SparseVectorBuilderVectorBuilder → Builder → Growable
  5. def +=(elem1: E, elem2: E, elems: E*): SparseVectorBuilder.this.type
    Definition Classes
    Growable
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def at(index: Int): SparseVectorBuilder.this.type
    Definition Classes
    VectorBuilder
  9. def clear(): Unit
    Definition Classes
    SparseVectorBuilderVectorBuilder → Builder → Growable → Clearable
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. val elems: ArrayBuffer[E]
    Attributes
    protected
    Definition Classes
    VectorBuilder
  12. val elemsMap: Map[Int, E]
    Attributes
    protected
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def mapResult[NewTo](f: (SparseVector[E]) ⇒ NewTo): Builder[E, NewTo]
    Definition Classes
    Builder
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def result(): SparseVector[E]
    Definition Classes
    SparseVectorBuilderVectorBuilder → Builder
  24. def sizeHint(coll: TraversableLike[_, _], delta: Int): Unit
    Definition Classes
    Builder
  25. def sizeHint(coll: TraversableLike[_, _]): Unit
    Definition Classes
    Builder
  26. def sizeHint(size: Int): Unit
    Definition Classes
    Builder
  27. def sizeHintBounded(size: Int, boundingColl: TraversableLike[_, _]): Unit
    Definition Classes
    Builder
  28. val startIndex: Int
    Attributes
    protected
    Definition Classes
    VectorBuilder
  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. def update[F <: E](i: Int, x: F)(implicit arg0: ClassTag[F]): Unit

    Sets the element with the specified index to the given value.

    Sets the element with the specified index to the given value.

    In case, there exists already a value at this index, it will be overridden.

    i

    the index

    x

    the value

    Definition Classes
    SparseVectorBuilderVectorBuilder
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from VectorBuilder[E, SparseVector[E]]

Inherited from Builder[E, SparseVector[E]]

Inherited from Growable[E]

Inherited from Clearable

Inherited from AnyRef

Inherited from Any

Ungrouped