PackMatricesInScalarArray Data Member Function

Packs an array of matrices in a scalar array. The column and row values are used to determine how the data is packed into the scalar array. For example, a matrix has 4x4 columns and rows, but packing only 2 columns and 2 rows means that fewer matrix values are stored in the scalar array. Values are packed contiguously until the source or destination run out of data.

Prototype

int32 PackMatricesInScalarArray( Float64Iterator first, Float64Iterator last, Float64Iterator dest, int32 p_nCols, int32 p_nRows, int32 p_bRowMajor )

Parameters

Parameter Type Parameter Name Documentation
<Float64Iterator>firstAn iterator at the start of the matrix array.
<Float64Iterator>lastAn iterator at the end of the matrix array.
<Float64Iterator>destAn iterator at the start of the destination array.
int32p_nColsThe number of matrix columns. For example 2 for mat2xN, 3 for mat3xN, or 4 for mat4xN.
int32p_nRowsThe number of matrix rows. For example 2 for matNx2, 3 for matNx3, or 4 for matNx4.
int32p_bRowMajorWhether or not the matrix is row or column major.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.