DenseMatrix

DenseMatrix

Dense matrix of numbers. Not really a Bioconductor-exclusive data structure, but we need this at a minimum for the SummarizedExperiment to be useful.

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 numberOfRows and numberOfColumns.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
columnMajor boolean <optional>
true

Whether values represents a column-major layout.

Classes

DenseMatrix

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 values.

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
Name Type Attributes Default Description
allowView boolean <optional>
false

Whether to allow a view to be returned, if possible.

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
Name Type Attributes Default Description
allowView boolean <optional>
false

Whether to allow a view to be returned, if possible.

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
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this DenseMatrix instance in place. If false, a new instance is returned.

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
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this DenseMatrix instance in place. If false, a new instance is returned.

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 values.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this DenseMatrix instance in place. If false, a new instance is returned.

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