HALCON Reference Manual 10.0.2
Table of Contents / Matrix / Access ClassesClassesClasses | | | Operators

set_value_matrixset_value_matrixset_value_matrixSetValueMatrixSetValueMatrix (Operator)

Name

set_value_matrixset_value_matrixset_value_matrixSetValueMatrixSetValueMatrix — Set one or more elements of a matrix.

Signature

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

Herror set_value_matrix(const Hlong MatrixID, const Hlong Row, const Hlong Column, double Value)

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

Herror set_value_matrix(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 HOperatorSetX.SetValueMatrix(
[in] VARIANT MatrixID, [in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Value)

void HMatrixX.SetValueMatrix(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Value)

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)

Description

The operator set_value_matrixset_value_matrixset_value_matrixSetValueMatrixSetValueMatrix sets the values of the elements of the input MatrixMatrixMatrixMatrixmatrix 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 <= Row < size of MatrixMatrixMatrixMatrixmatrix in the row direction and 0 <= Column < size of MatrixMatrixMatrixMatrixmatrix in the column direction must be satisfied. The MatrixMatrixMatrixMatrixmatrix is defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixID.

Example:


           /  3.0   0.0  -2.0   1.0  \
  Matrix = | -5.0   7.0   2.0  -2.0  |
           \  8.0  -4.0   1.0  -1.0  /

  Row = [0,2,1]     Column = [1,0,3]     Value = [1,-9,6]

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

Attention

set_value_matrixset_value_matrixset_value_matrixSetValueMatrixSetValueMatrix modifies the content of an already existing matrix.

Parallelization

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDmatrixID (input_control)  matrix HMatrix, HTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Matrix handle of the input matrix.

RowRowRowRowrow (input_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Row numbers of the matrix elements to be modified.

Default value: 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) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Column numbers of the matrix elements to be modified.

Default value: 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) HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Values to be set in the indicated matrix elements.

Default value: 0

Suggested values: 0, 1, -1

Result

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

Possible Predecessors

create_matrixcreate_matrixcreate_matrixCreateMatrixCreateMatrix

Possible Successors

clear_matrixclear_matrixclear_matrixClearMatrixClearMatrix, clear_all_matricesclear_all_matricesclear_all_matricesClearAllMatricesClearAllMatrices

See also

get_value_matrixget_value_matrixget_value_matrixGetValueMatrixGetValueMatrix

Module

Foundation


Table of Contents / Matrix / Access ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH