ClassesClassesClassesClasses | | | | Operators

set_full_matrixset_full_matrixSetFullMatrixset_full_matrixSetFullMatrixSetFullMatrix (Operator)

Name

set_full_matrixset_full_matrixSetFullMatrixset_full_matrixSetFullMatrixSetFullMatrix — Set all values of a matrix.

Signature

set_full_matrix( : : MatrixID, Values : )

Herror set_full_matrix(const Hlong MatrixID, double Values)

Herror T_set_full_matrix(const Htuple MatrixID, const Htuple Values)

Herror set_full_matrix(const HTuple& MatrixID, const HTuple& Values)

void HMatrix::SetFullMatrix(const HTuple& Values) const

void SetFullMatrix(const HTuple& MatrixID, const HTuple& Values)

void HMatrix::SetFullMatrix(const HTuple& Values) const

void HMatrix::SetFullMatrix(double Values) const

void HOperatorSetX.SetFullMatrix(
[in] VARIANT MatrixID, [in] VARIANT Values)

void HMatrixX.SetFullMatrix([in] VARIANT Values)

static void HOperatorSet.SetFullMatrix(HTuple matrixID, HTuple values)

void HMatrix.SetFullMatrix(HTuple values)

void HMatrix.SetFullMatrix(double values)

Description

The operator set_full_matrixset_full_matrixSetFullMatrixset_full_matrixSetFullMatrixSetFullMatrix sets all elements of the input MatrixMatrixMatrixMatrixMatrixmatrix defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID. The values of the parameter ValuesValuesValuesValuesValuesvalues can be a tuple of floating point or integer numbers. Integer numbers are converted to floating point numbers automatically. The parameter ValuesValuesValuesValuesValuesvalues must contain all values in a row-major order, i.e., stored line by line. In addition, the number of elements in ValuesValuesValuesValuesValuesvalues must be 1 or identical to the number of all elements of the matrix.

Note: The same result can be reached with the operator create_matrixcreate_matrixCreateMatrixcreate_matrixCreateMatrixCreateMatrix. The advantage by using the operator set_full_matrixset_full_matrixSetFullMatrixset_full_matrixSetFullMatrixSetFullMatrix is to recycle a matrix that is no longer needed. Thus, the runtime of the operation takes fewer time.

Example 1:


           /   0.0   0.0   0.0  \
  Matrix = |   0.0   0.0   0.0  |     Values = [3,1,-2,-5,7,2,-9,-4,1]
           \   0.0   0.0   0.0  /

                /   3.0   1.0  -2.0  \
  ->   Matrix = |  -5.0   7.0   2.0  |
                \  -9.0  -4.0   1.0  /

Example 2:


           /   0.0   0.0   0.0  \
  Matrix = |   0.0   0.0   0.0  |     Values = [  7  ]
           \   0.0   0.0   0.0  /

                /  7.0   7.0   7.0  \
  ->   Matrix = |  7.0   7.0   7.0  |
                \  7.0   7.0   7.0  /

Attention

set_full_matrixset_full_matrixSetFullMatrixset_full_matrixSetFullMatrixSetFullMatrix modifies the content of an already existing matrix.

Parallelization

Parameters

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

Matrix handle of the input matrix.

ValuesValuesValuesValuesValuesvalues (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Values to be set.

Result

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

Possible Predecessors

create_matrixcreate_matrixCreateMatrixcreate_matrixCreateMatrixCreateMatrix

Possible Successors

clear_matrixclear_matrixClearMatrixclear_matrixClearMatrixClearMatrix, clear_all_matricesclear_all_matricesClearAllMatricesclear_all_matricesClearAllMatricesClearAllMatrices

See also

get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix

Module

Foundation


ClassesClassesClassesClasses | | | | Operators