Packages

object MatrixQ extends Error with Serializable

The MatrixQ companion object provides operations for MatrixQ that don't require 'this' (like static methods in Java). It provides factory methods for building matrices from files or vectors.

Linear Supertypes
Serializable, Serializable, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MatrixQ
  2. Serializable
  3. Serializable
  4. Error
  5. AnyRef
  6. 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 ++(u: VectorQ, w: VectorQ): MatrixQ

    Concatenate (row) vectors 'u' and 'w' to form a matrix with 2 rows.

    Concatenate (row) vectors 'u' and 'w' to form a matrix with 2 rows.

    u

    the vector to be concatenated as the new first row in matrix

    w

    the vector to be concatenated as the new second row in matrix

  4. def ++^(u: VectorQ, w: VectorQ): MatrixQ

    Concatenate (column) vectors 'u' and 'w' to form a matrix with 2 columns.

    Concatenate (column) vectors 'u' and 'w' to form a matrix with 2 columns.

    u

    the vector to be concatenated as the new first column in matrix

    w

    the vector to be concatenated as the new second column in matrix

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def apply(fileName: String): MatrixQ

    Create a matrix by reading from a text file, e.g., a CSV file.

    Create a matrix by reading from a text file, e.g., a CSV file.

    fileName

    the name of file holding the data

  7. def apply(u: Vector[VectorQ]): MatrixQ

    Create a matrix and assign values from the Scala Vector of vectors 'u'.

    Create a matrix and assign values from the Scala Vector of vectors 'u'. Assumes vectors are columwise.

    u

    the Vector of vectors to assign

  8. def apply(u: Array[VectorQ], columnwise: Boolean = true): MatrixQ

    Create a matrix and assign values from the array of vectors 'u'.

    Create a matrix and assign values from the array of vectors 'u'.

    u

    the array of vectors to assign

    columnwise

    whether the vectors are treated as column or row vectors

  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def eye(m: Int, n: Int = 0): MatrixQ

    Create an 'm-by-n' identity matrix I (ones on main diagonal, zeros elsewhere).

    Create an 'm-by-n' identity matrix I (ones on main diagonal, zeros elsewhere). If 'n' is <= 0, set it to 'm' for a square identity matrix.

    m

    the row dimension of the matrix

    n

    the column dimension of the matrix (defaults to 0 => square matrix)

  14. final def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  15. def form_cw(x: VectorQ, y: Rational): MatrixQ

    Form a matrix from a vector 'x' and a scalar 'y', column-wise.

    Form a matrix from a vector 'x' and a scalar 'y', column-wise.

    x

    the first vector -> column 0

    y

    the second scalar -> column 1 (repeat scalar)

  16. def form_cw(x: Rational, y: VectorQ): MatrixQ

    Form a matrix from a scalar 'x' and a vector 'y', column-wise.

    Form a matrix from a scalar 'x' and a vector 'y', column-wise.

    x

    the first scalar -> column 0 (repeat scalar)

    y

    the second vector -> column 1

  17. def form_cw(x: VectorQ, y: VectorQ): MatrixQ

    Form a matrix from two vectors 'x' and 'y', column-wise.

    Form a matrix from two vectors 'x' and 'y', column-wise.

    x

    the first vector -> column 0

    y

    the second vector -> column 1

  18. def form_rw(x: VectorQ, y: Rational): MatrixQ

    Form a matrix from a vector 'x' and a scalar 'y', row-wise.

    Form a matrix from a vector 'x' and a scalar 'y', row-wise.

    x

    the first vector -> row 0

    y

    the second scalar -> row 1 (repeat scalar)

  19. def form_rw(x: Rational, y: VectorQ): MatrixQ

    Form a matrix from scalar 'x' and a vector 'y', row-wise.

    Form a matrix from scalar 'x' and a vector 'y', row-wise.

    x

    the first scalar -> row 0 (repeat scalar)

    y

    the second vector -> row 1

  20. def form_rw(x: VectorQ, y: VectorQ): MatrixQ

    Form a matrix from two vectors 'x' and 'y', row-wise.

    Form a matrix from two vectors 'x' and 'y', row-wise.

    x

    the first vector -> row 0

    y

    the second vector -> row 1

  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. def outer(x: VectorQ, y: VectorQ): MatrixQ

    Compute the outer product of vector 'x' and vector 'y'.

    Compute the outer product of vector 'x' and vector 'y'. The result of the outer product is a matrix where 'c(i, j)' is the product of 'i'-th element of 'x' with the 'j'-th element of 'y'.

    x

    the first vector

    y

    the second vector

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def times(u: VectorQ, a: MatrixQ): VectorQ

    Multiply vector 'u' by matrix 'a'.

    Multiply vector 'u' by matrix 'a'. Treat 'u' as a row vector.

    u

    the vector to multiply by

    a

    the matrix to multiply by (requires sameCrossDimensions)

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

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped