Click or drag to resize

DoubleMatrixDense Method (Int32, Int32, Double, Boolean)

Creates a dense DoubleMatrix instance having the specified size, and assigns data to entries, possibly preventing copying operations before creation.

Namespace:  Novacta.Analytics
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
public static DoubleMatrix Dense(
	int numberOfRows,
	int numberOfColumns,
	double[] data,
	bool copyData
)

Parameters

numberOfRows
Type: SystemInt32
The number of matrix rows.
numberOfColumns
Type: SystemInt32
The number of matrix columns.
data
Type: SystemDouble
The data assigned to matrix entries.
copyData
Type: SystemBoolean
true if data must be copied before instantiation; otherwise false.

Return Value

Type: DoubleMatrix
The matrix having the specified size and data.
Exceptions
ExceptionCondition
ArgumentExceptiondata has Length not equal to the multiplication of numberOfRows by numberOfColumns.
ArgumentOutOfRangeExceptionnumberOfRows is not positive.
-or-
numberOfColumns is not positive.
ArgumentNullExceptiondata is null.
Remarks

DoubleMatrix dense instances allocate storage for each matrix entry.

Parameter data is unidimensional, while matrix entries are bi-dimensional, since are defined by their row and column indexes. As a consequence, entries must be linearly ordered to define a correspondence between data and matrix entries. The order of data is assumed by columns (see ColumnMajor): matrix entries are ordered by their column index first, and entries laying on a given column are in turn ordered by their row index. This implies that the first numberOfRows entries in data will be assumed to contain the first column of the returned matrix, and so on.

See Also