The `MatrixD companion object provides factory methods.
Attributes
Members list
Value members
Concrete methods
Create a matrix from repeated values.
Create a matrix from repeated values.
Value parameters
- dim
-
the (row, column) dimensions
- u
-
the repeated values
Attributes
Create a square matrix of dimension dim where all elements equal zero.
Create a square matrix of dimension dim where all elements equal zero.
Value parameters
- dim
-
the square dimensions
Attributes
Create a matrix from a variable argument list of vectors (row-wise). Use transpose to make it column-wise.
Create a matrix from a variable argument list of vectors (row-wise). Use transpose to make it column-wise.
Value parameters
- vs
-
the vararg list of vectors
Attributes
Create a matrix from an mutable IndexedSeq
of vectors (row-wise). Use transpose to make it column-wise.
Create a matrix from an mutable IndexedSeq
of vectors (row-wise). Use transpose to make it column-wise.
Value parameters
- vs
-
the indexed sequence of vectors
Attributes
Create a matrix from an immutable IndexedSeq
of vectors (row-wise), as produce by for yield. Use transpose to make it column-wise.
Create a matrix from an immutable IndexedSeq
of vectors (row-wise), as produce by for yield. Use transpose to make it column-wise.
Value parameters
- vs
-
the indexed sequence of vectors
Attributes
Create a matrix of dimensions dim by dim2 where all elements equal zero.
Create a matrix of dimensions dim by dim2 where all elements equal zero.
Value parameters
- dim
-
the row dimension
- dim2
-
the column dimension
Attributes
Create a matrix of dimensions dim by dim2 where all elements equal to the given value.
Create a matrix of dimensions dim by dim2 where all elements equal to the given value.
Value parameters
- dim
-
the row dimension
- dim2
-
the column dimension
- value
-
the given value to assign to all elements
Attributes
Create an m-by-1 matrix from an m-vector (column-wise).
Create an m-by-1 matrix from an m-vector (column-wise).
Value parameters
- v
-
the vector to build the matrix from
Attributes
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.
Value parameters
- fileName
-
the name of file holding the data
- fullPath
-
flag indivating whether to use full-path or path relative to 'DATA_DIR' defaults to false (relative paths)
- skip
-
the initial number of lines/rows to skip
- skipCol
-
the initial number of columns to skip
- sp
-
the character used to separate values (',', '\t', ...)
Attributes
Create a matrix-vector pair (x, y) by reading from a text file, e.g., a CSV file. Use readFileIter to only read the necessary columns from the file.
Create a matrix-vector pair (x, y) by reading from a text file, e.g., a CSV file. Use readFileIter to only read the necessary columns from the file.
Value parameters
- fileName
-
the name of file holding the data
- fullPath
-
flag indivating whether to use full-path or path relative to 'DATA_DIR' defaults to false (relative paths)
- skip
-
the initial number of lines to skip
- sp
-
the character used to separate values (',', '\t', ...)
- xCols
-
the columns that are to make up the x-matrix
- yCol
-
the column that is to make up the y-vector (use the defualt -1 to skip this)
Attributes
Create a matrix of dimension dim by 1 that consists of all ones.
Create a matrix of dimension dim by 1 that consists of all ones.
Value parameters
- dim
-
the row dimension
Attributes
Compute the outer product of vector x and vector y. The result of the outer product is a matrix where element (i, j) is the product of i-th element of x with the j-th element of y.
Compute the outer product of vector x and vector y. The result of the outer product is a matrix where element (i, j) is the product of i-th element of x with the j-th element of y.
Value parameters
- x
-
the first vector
- y
-
the second vector