Operator Reference

set_full_matrixT_set_full_matrixSetFullMatrixSetFullMatrixset_full_matrix (Operator)

set_full_matrixT_set_full_matrixSetFullMatrixSetFullMatrixset_full_matrix — Set all values of a matrix.

Signature

set_full_matrix( : : MatrixID, Values : )

Herror T_set_full_matrix(const Htuple MatrixID, const Htuple Values)

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

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

void HMatrix::SetFullMatrix(double Values) const

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

void HMatrix.SetFullMatrix(HTuple values)

void HMatrix.SetFullMatrix(double values)

def set_full_matrix(matrix_id: HHandle, values: MaybeSequence[Union[int, float]]) -> None

Description

The operator set_full_matrixset_full_matrixSetFullMatrixSetFullMatrixset_full_matrix sets all elements of the input Matrix defined by the matrix handle MatrixIDMatrixIDMatrixIDmatrixIDmatrix_id. The values of the parameter ValuesValuesValuesvaluesvalues can be a tuple of floating point or integer numbers. Integer numbers are converted to floating point numbers automatically. The parameter ValuesValuesValuesvaluesvalues must contain all values in a row-major order, i.e., stored line by line. In addition, the number of elements in ValuesValuesValuesvaluesvalues 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_matrixCreateMatrixCreateMatrixcreate_matrix. The advantage by using the operator set_full_matrixset_full_matrixSetFullMatrixSetFullMatrixset_full_matrix is to recycle a matrix that is no longer needed. Thus, the runtime of the operation takes fewer time.

Example 1:

Example 2:

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

MatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (input_control, state is modified)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix.

ValuesValuesValuesvaluesvalues (input_control)  number(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Values to be set.

Result

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

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixcreate_matrix

Possible Successors

clear_matrixclear_matrixClearMatrixClearMatrixclear_matrix

See also

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixget_full_matrix

Module

Foundation