set_value_matrixT_set_value_matrixSetValueMatrixSetValueMatrixset_value_matrix (Operator)

Name

set_value_matrixT_set_value_matrixSetValueMatrixSetValueMatrixset_value_matrix — Set one or more elements of a matrix.

Signature

set_value_matrix( : : MatrixID, Row, Column, Value : )

Herror T_set_value_matrix(const Htuple MatrixID, const Htuple Row, const Htuple Column, const Htuple Value)

void SetValueMatrix(const HTuple& MatrixID, const HTuple& Row, const HTuple& Column, const HTuple& Value)

void HMatrix::SetValueMatrix(const HTuple& Row, const HTuple& Column, const HTuple& Value) const

void HMatrix::SetValueMatrix(Hlong Row, Hlong Column, double Value) const

static void HOperatorSet.SetValueMatrix(HTuple matrixID, HTuple row, HTuple column, HTuple value)

void HMatrix.SetValueMatrix(HTuple row, HTuple column, HTuple value)

void HMatrix.SetValueMatrix(int row, int column, double value)

def set_value_matrix(matrix_id: HHandle, row: MaybeSequence[int], column: MaybeSequence[int], value: MaybeSequence[Union[int, float]]) -> None

Description

The operator set_value_matrixset_value_matrixSetValueMatrixSetValueMatrixset_value_matrix sets the values of the elements of the input Matrix at the positions (RowRowRowrowrow,ColumnColumnColumncolumncolumn) to the values specified by ValueValueValuevaluevalue. The values can be a tuple of floating point or integer numbers. Integer numbers are converted to floating point numbers automatically. The number of values of ValueValueValuevaluevalue must match the number of elements of RowRowRowrowrow and ColumnColumnColumncolumncolumn. In addition, the conditions 0 RowRowRowrowrow < size of Matrix in the row direction and 0 ColumnColumnColumncolumncolumn < size of Matrix in the column direction must be satisfied. The Matrix is defined by the matrix handle MatrixIDMatrixIDMatrixIDmatrixIDmatrix_id.

Example:

RowRowRowrowrow = [0,2,1], ColumnColumnColumncolumncolumn = [1,0,3], ValueValueValuevaluevalue = [1,-9,6]

Execution Information

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.

RowRowRowrowrow (input_control)  integer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row numbers of the matrix elements to be modified.

Default: 0

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

Restriction: Row >= 0

ColumnColumnColumncolumncolumn (input_control)  integer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column numbers of the matrix elements to be modified.

Default: 0

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

Restriction: Column >= 0

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

Values to be set in the indicated matrix elements.

Default: 0

Suggested values: 0, 1, -1

Result

If the parameters are valid, the operator set_value_matrixset_value_matrixSetValueMatrixSetValueMatrixset_value_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_value_matrixget_value_matrixGetValueMatrixGetValueMatrixget_value_matrix

Module

Foundation