Constructs a DoubleMatrix instance from a data block.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public DoubleMatrix(
	int rows,
	int cols,
	DoubleDataBlock data
)
Visual Basic (Declaration)
Public Sub New ( _
	rows As Integer, _
	cols As Integer, _
	data As DoubleDataBlock _
)
Visual C++
public:
DoubleMatrix(
	int rows, 
	int cols, 
	DoubleDataBlock^ data
)

Parameters

rows
Type: System..::.Int32
The number of rows.
cols
Type: System..::.Int32
The number of cols.
data
Type: CenterSpace.NMath.Core..::.DoubleDataBlock
A data block.

Remarks

No data is copied. The new matrix references the given data block.

Examples

This code creates a DoubleMatrix that references a one-dimensional array array with 12 elements:
CopyC#
DoubleDataBlock data = new DoubleDataBlock( array, 0 );
DoubleMatrix A = new DoubleMatrix( 4, 3, data );

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.MismatchedSizeException Thrown if data.Length != rows * cols.

See Also