VectorS

scalation.mathstat.VectorS
See theVectorS companion class
object VectorS

The VectorS object is the companion object for the VectorS class.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
VectorS.type

Members list

Value members

Concrete methods

def apply(xs: IndexedSeq[String]): VectorS

Create a VectorS from an immutable indexed sequence of Strings.

Create a VectorS from an immutable indexed sequence of Strings.

Value parameters

xs

the sequence/array of the String numbers

Attributes

def apply(xs: IndexedSeq[String]): VectorS

Create a VectorS from a mutable indexed sequence of Strings.

Create a VectorS from a mutable indexed sequence of Strings.

Value parameters

xs

the sequence/array of the String numbers

Attributes

def apply(x: String, xs: String*): VectorS

Create a VectorS from one or more values (repeated values String*).

Create a VectorS from one or more values (repeated values String*).

Value parameters

x

the first String number

xs

the varargs of String numbers

Attributes

def fill(n: Int)(x: String): VectorS

Create a VectorS with n elements and fill it with the value x.

Create a VectorS with n elements and fill it with the value x.

Value parameters

n

the number of elements

x

the value to assign to all elements

Attributes

def fromStrings(xs: IndexedSeq[String]): VectorS

Create a VectorS from a mutable indexed sequence of String. FIX - for numeric types, assign missing value indicator upon format failure.

Create a VectorS from a mutable indexed sequence of String. FIX - for numeric types, assign missing value indicator upon format failure.

Value parameters

xs

the sequence/array of the String numbers

Attributes

def map2Int(a: Array[String]): (Array[Int], BiMap[String, Int])

Convert an Array [String] into an Array [Int] by mapping each distinct value in Array [String] into a distinct numeric integer value, returning the new vector and the bidirectional mapping. Use the from method in BiMap to recover the original string. e.g., Array ("A", "B", "C", "A", "D") will be mapped to Array (0, 1, 2, 0, 3)

Convert an Array [String] into an Array [Int] by mapping each distinct value in Array [String] into a distinct numeric integer value, returning the new vector and the bidirectional mapping. Use the from method in BiMap to recover the original string. e.g., Array ("A", "B", "C", "A", "D") will be mapped to Array (0, 1, 2, 0, 3)

Value parameters

a

the array of strings to be converted

Attributes

def one(n: Int): VectorS

Create a one vector (all elements are one) of length n.

Create a one vector (all elements are one) of length n.

Value parameters

size

the size of the new vector

Attributes

def oneAt(j: Int, size: Int): VectorS

Create a vector of the form (0, ... 1, ... 0) where the 1 is at position j.

Create a vector of the form (0, ... 1, ... 0) where the 1 is at position j.

Value parameters

j

the position to place the 1

size

the size of the vector (upper bound = size - 1)

Attributes

def range(r: Range): VectorS

Return a VectorS consisting of a sequence of integers in a range.

Return a VectorS consisting of a sequence of integers in a range.

Value parameters

r

the range of values

Attributes

def range(i1: Int, i2: Int): VectorS

Concrete fields

val nullv: VectorS

Create a null vector of type VectorS.

Create a null vector of type VectorS.

Attributes