c

Any.Datum.Vals

final class _Class[A] extends Idx[A] with Custom.Array.View[A] with Any.Datum.Vals.Like[A]

Vals is an immutable array backed collection of Any.Datum

Any defined Datum elements, when put into a generic collection, are wrapped as Objects and take significant resources

Vals strips Object boxing and only stores values

val vector: Vector[Percent] = (1 <> 1000000).all.map(_.Percent).all.to[Vector]

// vector stores 1,000,000 objects Percent


val values: Vals[Percent] = (1 <> 1000000).all.map(_.Percent).toVals

// values stores a single Array[Double] object, holding 1,000,000 primitive values
Ordering
  1. Alphabetic
Inherited
  1. Vals
  2. Vals.Like
  3. Custom.Array.View
  4. Any.Able.Void
  5. Idx
  6. Any.Collection
  7. scala.AnyRef
  8. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type

  1. type Vals.TYPE = Any.Datum.Vals[A]
    Attributes
    protected
    Definition Classes
    _ClassView

Constant

  1. val real: Array[VALUE]
    Attributes
    protected
    Definition Classes
    _Class
  2. val setup: Any.Datum.Setup[A]
    Definition Classes
    _ClassLike

Method

  1. def all: ~[A]

    Returns a Stream of all elements

    Returns a Stream of all elements

    The element order is same as in the Idx.

    val index = Idx.*(1,3,5,7)
    index.all.lp
    // Output
    ~(1, 3, 5, 7)
    Definition Classes
    _Trait_Trait
  2. def allReal: Stream[VALUE]
    Definition Classes
    _ClassLike
  3. def apply(i: scala.Int): A

    Returns element at position

    Returns element at position

    Definition Classes
    _ClassView_Trait
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def base: Array[A]
    Attributes
    protected
    Definition Classes
    _ClassView
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contains(v: A): Boolean

    Inclusion check

    Inclusion check

    Returns true if specified value is contained within

    Attributes
    protected
    Definition Classes
    View
  8. def copy(r: Idx.Range): Vals[A]

    Copy range

    Copy range

    Copies elements within the range specified

    ('A' <> 'Z').all.toArray.copy(3 <> 10).all.lp  // Prints: ~(D, E, F, G, H, I, J, K)
    Definition Classes
    _ClassView
  9. def copyDrop(r: Idx.Range): Vals[A]

    Copy without range

    Copy without range

    Copies elements outside the range specified

    ('A' <> 'Z').all.toArray.copyDrop(3 <> 20).all.lp // Prints: ~(A, B, C, V, W, X, Y, Z)
    Definition Classes
    _ClassView
  10. def copyFirst(number: scala.Int): Vals.TYPE

    Copy start

    Copy start

    Copies specified number of first elements

    ('A' <> 'Z').all.toArray.copyFirst(5).all.lp  // Prints: ~(A, B, C, D, E)
    Definition Classes
    View
  11. def copyFrom(position: scala.Int): Vals.TYPE

    Copy end

    Copy end

    Copies elements from specified position to the end

    ('A' <> 'Z').all.toArray.copyFrom(20).all.lp  // Prints: ~(U, V, W, X, Y, Z)
    Definition Classes
    View
  12. def copyFull: Vals.TYPE

    Copy everything

    Copy everything

    Copies entire content

    Definition Classes
    View
  13. def copyLast(number: scala.Int): Vals.TYPE

    Copy end

    Copy end

    Copies specified number of elements at the end

    ('A' <> 'Z').all.toArray.copyLast(5).all.lp  // Prints: ~(V, W, X, Y, Z)
    Definition Classes
    View
  14. def copyShort(cnt: scala.Int): Vals.TYPE

    Copy without end

    Copy without end

    Copies from the beginning, missing specified number of elements at the end

    ('A' <> 'Z').all.toArray.copyShort(20).all.lp  // Prints: ~(A, B, C, D, E, F)
    Definition Classes
    View
  15. def copyTo(destArray: Array[_ >: A], destPos: scala.Int = 0, srcRangeOpt: Opt[Idx.Range] = \/): scala.Int

    Copy to another array

    Copy to another array

    Copies elements to target array

    Definition Classes
    View
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def hashCode(): scala.Int
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def isVoid: Boolean

    Void check

    Void check

    Returns true if this instance is void

    Definition Classes
    ViewVoid
  22. def length: scala.Int
    Definition Classes
    _Class
  23. def make: (Array[A]) ⇒ Vals[A]
    Attributes
    protected
    Definition Classes
    _ClassView
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  27. def size: scala.Int

    Number of elements

    Number of elements

    Readily available, not calculated element count

    Idx.*(1,3,5,7).size.lp  // Prints: 4
    Definition Classes
    _ClassView_Trait
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toArray(implicit t: ClassTag[A]): Array[A]

    Copy to Array

    Copy to Array

    Copies all elements to a new Array

    Definition Classes
    View
  30. def toString(): java.lang.String

    Description

    Description

    Provides description of size and array type

    Definition Classes
    View → Any
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: scala.Long, arg1: scala.Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: scala.Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): scala.Int
    Definition Classes
    AnyRef → Any
  3. def +(v: A): Vals[A]

    Plus

    Plus

    Creates a new instance with value added

    // Generic Refs example
    val a1: Refs[Char] = Refs.*('a', 'b', 'c')
    val a2: Refs[Char] = a1 + 'x' + 'y' + 'z'
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(a, b, c, x, y, z)
    Definition Classes
    _ClassView
  4. def +@(i: scala.Int, v: A): Vals[A]

    Plus at position

    Plus at position

    Creates a new instance with specified value added at specified position

    val a1: Chars = Chars.*('a', 'b', 'c')
    val a2: Chars = a1 +@ (3, 'Z') +@ (1, 'X')
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(a, X, b, c, Z)
    Definition Classes
    _ClassView
  5. def +~(v: ~[A]): Vals[A]

    Plus all

    Plus all

    Creates a new instance with added stream values

    val a1: Refs[Char] = Refs.*('a', 'b', 'c')
    val a2: Refs[Char] = a1 +~ ~.*('x', 'y', 'z') +~ ('x' <> 'z')
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(a, b, c, x, y, z, x, y, z)
    Definition Classes
    _ClassView
  6. def +~@(i: scala.Int, v: ~[A]): Vals[A]

    Plus stream at position

    Plus stream at position

    Creates a new instance with stream values added at specified position

    val a1: Refs[Char] = Refs.*('a', 'b', 'c')
    val a2: Refs[Char] = a1 +~@ (3, 'X' <> 'Z') +~@ (0, 'W' ~+ 'W' + 'W')
    
    a1.all.lp // Prints: ~(a, b, c)
    a2.all.lp // Prints: ~(W, W, W, a, b, c, X, Y, Z)
    Definition Classes
    _ClassView
  7. def -(v: A): Vals[A]

    Subtract value

    Subtract value

    Creates a new instance with specified value removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 - 'b' - 'd' - 'f'
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, c, e, g)
    Definition Classes
    _ClassView
  8. def -@(position: scala.Int): Vals.TYPE

    Subtract position

    Subtract position

    Creates a new instance with given position removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 -~ ('c' <> 'e')
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, b, f, g)
    Definition Classes
    View
  9. def -@(r: Idx.Range): Vals.TYPE

    Subtract range

    Subtract range

    Creates a new instance with elements within range removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 -~ ('c' <> 'e')
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, b, f, g)
    Definition Classes
    View
  10. def -~(v: ~[A]): Vals[A]

    Subtract all values

    Subtract all values

    Creates a new instance with all stream values removed

    // Generic Refs example
    val a1: Refs[Char] = ('a' <> 'g').all.to[Refs]
    val a2: Refs[Char] = a1 -~ ('c' <> 'e')
    
    a1.all.lp // Prints: ~(a, b, c, d, e, f, g)
    a2.all.lp // Prints: ~(a, b, f, g)
    Definition Classes
    _ClassView
  11. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
Linear Supertypes
Source: _Class.scala