Constructor
new DenseMatrix(numberOfRows, numberOfColumns, values, optionsopt)
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
numberOfRows |
number | Number of rows, duh. |
||||||||||||
numberOfColumns |
number | Number of columns. |
||||||||||||
values |
TypedArray | 1-dimensional array of the matrix contents.
This should have length equal to the product of |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Classes
Methods
$setColumn(i, values) → {DenseMatrix}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
i |
number | Column index to set. |
values |
TypedArray | Column contents, of length equal to the number of columns in this DenseMatrix. |
Returns:
A reference to this DenseMatrix after modifying the matrix contents.
- Type
- DenseMatrix
$setRow(i, values) → {DenseMatrix}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
i |
number | Row index to set. |
values |
TypedArray | Row contents, of length equal to the number of columns in this DenseMatrix. |
Returns:
A reference to this DenseMatrix after modifying the matrix contents.
- Type
- DenseMatrix
$setValues(values) → {DenseMatrix}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
values |
TypedArray | 1-dimensional array of matrix contents,
of the same length as the array returned by |
Returns:
A reference to this DenseMatrix after modifying the matrix contents.
- Type
- DenseMatrix
column(i, optionsopt) → {TypedArray}
- Source:
Retrieve the contents of a particular column.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i |
number | Index of the column of interest. |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Contents of the column i
.
This may be a view on the array returned by values
, if permitted by the layout.
- Type
- TypedArray
isColumnMajor() → {boolean}
- Source:
Returns:
Whether the matrix is column-major.
- Type
- boolean
numberOfColumns() → {number}
- Source:
Returns:
Number of columns.
- Type
- number
numberOfRows() → {number}
- Source:
Returns:
Number of rows.
- Type
- number
row(i, optionsopt) → {TypedArray}
- Source:
Retrieve the contents of a particular row.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i |
number | Index of the row of interest. |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Contents of the row i
.
This may be a view on the array returned by values
, if permitted by the layout.
- Type
- TypedArray
setColumn(i, values, optionsopt) → {DenseMatrix}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i |
number | Column index to set. |
||||||||||||
values |
TypedArray | Column contents, of length equal to the number of rows in this DenseMatrix. |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The DenseMatrix after modifying the matrix contents.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- DenseMatrix
setRow(i, values, optionsopt) → {DenseMatrix}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i |
number | Row index to set. |
||||||||||||
values |
TypedArray | Row contents, of length equal to the number of columns in this DenseMatrix. |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The DenseMatrix after modifying the matrix contents.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- DenseMatrix
setValues(values, optionsopt) → {DenseMatrix}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
values |
TypedArray | 1-dimensional array of matrix contents,
of the same length as the array returned by |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The DenseMatrix after modifying the matrix contents.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- DenseMatrix
values() → {TypedArray}
- Source:
Returns:
Matrix contents as a 1-dimensional array.
- Type
- TypedArray