This library is fundamentally an adaptation of the Java Matrix library, JaMa, by MathWorks Inc. and the National Institute of Standards and Technology.
Attributes
- Companion:
- class
- Source:
- Matrix.scala
- Graph
- Supertypes
- Self type
- Matrix.type
Members list
Value members
Concrete methods
Construct a matrix from a 2-D array.
Construct a matrix from a 2-D array.
Attributes
- values
Two-dimensional array of doubles.
- Throws:
- IllegalArgumentException
All rows must have the same length
- Source:
- Matrix.scala
Construct an MxN constant matrix.
Construct an MxN constant matrix.
Attributes
- M
the number of rows
- N
the number of columns
- value
Fill the matrix with this scalar value.
- Returns:
an MxN constant matrix.
- Source:
- Matrix.scala
Construct a matrix from a one-dimensional packed array
Construct a matrix from a one-dimensional packed array
Attributes
- m
Number of rows.
- vals
One-dimensional array of doubles, packed by columns (ala Fortran).
- Throws:
- IllegalArgumentException
Array length must be a multiple of m.
- Source:
- Matrix.scala
Construct a matrix from a copy of a 2-D array.
Construct a matrix from a copy of a 2-D array.
Attributes
- values
Two-dimensional array of doubles.
- Throws:
- IllegalArgumentException
All rows must have the same length
- Source:
- Matrix.scala
Generate identity matrix scaled by value parameter.
Generate identity matrix scaled by value parameter.
Attributes
- columns
Number of colums.
- rows
Number of rows.
- value
scalar multiplier.
- Returns:
An MxN matrix with ones on the diagonal and zeros elsewhere.
- Source:
- Matrix.scala
Generate a square matrix with the supplied vector along the diagonal.
Generate a square matrix with the supplied vector along the diagonal.
Attributes
- v
a vector
- Source:
- Matrix.scala
Attributes
- Source:
- Matrix.scala
Generate identity matrix
Generate identity matrix
Attributes
- M
the number of rows
- N
the number of columns
- Returns:
An MxN matrix with ones on the diagonal and zeros elsewhere.
- Source:
- Matrix.scala
Generate matrix with random elements
Generate matrix with random elements
Attributes
- M
the number of rows
- N
the number of columns
- maxNorm
optional Maximum random generated value allowed.
- r
optional random instance.
- Returns:
An MxN matrix with uniformly distributed random elements.
- Source:
- Matrix.scala