ClassesClassesClassesClasses | | | | Operators

repeat_matrixrepeat_matrixRepeatMatrixrepeat_matrixRepeatMatrixRepeatMatrix (Operator)

Name

repeat_matrixrepeat_matrixRepeatMatrixrepeat_matrixRepeatMatrixRepeatMatrix — Repeat a matrix.

Signature

repeat_matrix( : : MatrixID, Rows, Columns : MatrixRepeatedID)

Herror repeat_matrix(const Hlong MatrixID, const Hlong Rows, const Hlong Columns, Hlong* MatrixRepeatedID)

Herror T_repeat_matrix(const Htuple MatrixID, const Htuple Rows, const Htuple Columns, Htuple* MatrixRepeatedID)

Herror repeat_matrix(const HTuple& MatrixID, const HTuple& Rows, const HTuple& Columns, Hlong* MatrixRepeatedID)

HMatrix HMatrix::RepeatMatrix(const HTuple& Rows, const HTuple& Columns) const

void RepeatMatrix(const HTuple& MatrixID, const HTuple& Rows, const HTuple& Columns, HTuple* MatrixRepeatedID)

HMatrix HMatrix::RepeatMatrix(Hlong Rows, Hlong Columns) const

void HOperatorSetX.RepeatMatrix(
[in] VARIANT MatrixID, [in] VARIANT Rows, [in] VARIANT Columns, [out] VARIANT* MatrixRepeatedID)

IHMatrixX* HMatrixX.RepeatMatrix(
[in] Hlong Rows, [in] Hlong Columns)

static void HOperatorSet.RepeatMatrix(HTuple matrixID, HTuple rows, HTuple columns, out HTuple matrixRepeatedID)

HMatrix HMatrix.RepeatMatrix(int rows, int columns)

Description

The operator repeat_matrixrepeat_matrixRepeatMatrixrepeat_matrixRepeatMatrixRepeatMatrix creates the new matrix MatrixRepeatedMatrixRepeatedMatrixRepeatedMatrixRepeatedMatrixRepeatedmatrixRepeated and copies all elements of the input MatrixMatrixMatrixMatrixMatrixmatrix n times to this new matrix, where n = RowsRowsRowsRowsRowsrows * ColumnsColumnsColumnsColumnsColumnscolumns. The new matrix has dimensions RowsRowsRowsRowsRowsrows * rows of the input MatrixMatrixMatrixMatrixMatrixmatrix and ColumnsColumnsColumnsColumnsColumnscolumns * columns of the input MatrixMatrixMatrixMatrixMatrixmatrix. The input MatrixMatrixMatrixMatrixMatrixmatrix is defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID. The operator returns the matrix handle MatrixRepeatedIDMatrixRepeatedIDMatrixRepeatedIDMatrixRepeatedIDMatrixRepeatedIDmatrixRepeatedID of the matrix MatrixRepeatedMatrixRepeatedMatrixRepeatedMatrixRepeatedMatrixRepeatedmatrixRepeated. Access to the elements of the matrix is possible e.g. with the operator get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix.

Example:


           /   3.0  -1.0  -2.0  \
  Matrix = \  -5.0   7.0   2.0  /    ->    Rows = 2     Columns = 3

                        /  3.0  -1.0  -2.0   3.0  -1.0  -2.0   3.0  -1.0  -2.0 \
                        | -5.0   7.0   2.0  -5.0   7.0   2.0  -5.0   7.0   2.0 |
  ->   MatrixRepeated = |  3.0  -1.0  -2.0   3.0  -1.0  -2.0   3.0  -1.0  -2.0 |
                        \ -5.0   7.0   2.0  -5.0   7.0   2.0  -5.0   7.0   2.0 /

Parallelization

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID (input_control)  matrix HMatrix, HTupleHTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Matrix handle of the input matrix.

RowsRowsRowsRowsRowsrows (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of copies of input matrix in row direction.

Default value: 2

Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20

Restriction: Rows >= 1

ColumnsColumnsColumnsColumnsColumnscolumns (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of copies of input matrix in column direction.

Default value: 2

Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20

Restriction: Columns >= 1

MatrixRepeatedIDMatrixRepeatedIDMatrixRepeatedIDMatrixRepeatedIDMatrixRepeatedIDmatrixRepeatedID (output_control)  matrix HMatrix, HTupleHTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Matrix handle of the repeated copied matrix.

Result

If the parameters are valid, the operator repeat_matrixrepeat_matrixRepeatMatrixrepeat_matrixRepeatMatrixRepeatMatrix returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

create_matrixcreate_matrixCreateMatrixcreate_matrixCreateMatrixCreateMatrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix, get_value_matrixget_value_matrixGetValueMatrixget_value_matrixGetValueMatrixGetValueMatrix

See also

copy_matrixcopy_matrixCopyMatrixcopy_matrixCopyMatrixCopyMatrix

Module

Foundation


ClassesClassesClassesClasses | | | | Operators