ClassesClasses | | Operators

scale_matrixscale_matrixScaleMatrixScaleMatrix (Operator)

Name

scale_matrixscale_matrixScaleMatrixScaleMatrix — Scale a matrix.

Signature

scale_matrix( : : MatrixID, Factor : MatrixScaledID)

Herror scale_matrix(const Hlong MatrixID, double Factor, Hlong* MatrixScaledID)

Herror T_scale_matrix(const Htuple MatrixID, const Htuple Factor, Htuple* MatrixScaledID)

void ScaleMatrix(const HTuple& MatrixID, const HTuple& Factor, HTuple* MatrixScaledID)

HMatrix HMatrix::ScaleMatrix(const HTuple& Factor) const

HMatrix HMatrix::ScaleMatrix(double Factor) const

static void HOperatorSet.ScaleMatrix(HTuple matrixID, HTuple factor, out HTuple matrixScaledID)

HMatrix HMatrix.ScaleMatrix(HTuple factor)

HMatrix HMatrix.ScaleMatrix(double factor)

Description

The operator scale_matrixscale_matrixScaleMatrixScaleMatrixScaleMatrix scales the MatrixMatrixMatrixMatrixmatrix by a constant factor. The matrix is defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixID. A new matrix MatrixScaledMatrixScaledMatrixScaledMatrixScaledmatrixScaled is generated with the result. The operator returns the matrix handle MatrixScaledIDMatrixScaledIDMatrixScaledIDMatrixScaledIDmatrixScaledID. Access to the elements of the matrix is possible e.g. with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrix. The formula for the calculation of the result is:

Example:

Execution Information

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDmatrixID (input_control)  matrix HMatrix, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Matrix handle of the input matrix.

FactorFactorFactorFactorfactor (input_control)  number HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Scale factor.

Default value: 2.0

Suggested values: 0.1, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0, 10.0

MatrixScaledIDMatrixScaledIDMatrixScaledIDMatrixScaledIDmatrixScaledID (output_control)  matrix HMatrix, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Matrix handle with the scaled elements.

Result

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

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrix

Alternatives

scale_matrix_modscale_matrix_modScaleMatrixModScaleMatrixModScaleMatrixMod

See also

mult_element_matrixmult_element_matrixMultElementMatrixMultElementMatrixMultElementMatrix, mult_element_matrix_modmult_element_matrix_modMultElementMatrixModMultElementMatrixModMultElementMatrixMod, div_element_matrixdiv_element_matrixDivElementMatrixDivElementMatrixDivElementMatrix, div_element_matrix_moddiv_element_matrix_modDivElementMatrixModDivElementMatrixModDivElementMatrixMod

Module

Foundation


ClassesClasses | | Operators