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

determinant_matrixdeterminant_matrixdeterminant_matrixDeterminantMatrixDeterminantMatrix (Operator)

Name

determinant_matrixdeterminant_matrixdeterminant_matrixDeterminantMatrixDeterminantMatrix — Compute the determinant of a matrix.

Signature

determinant_matrix( : : MatrixID, MatrixType : Value)

Herror determinant_matrix(const Hlong MatrixID, const char* MatrixType, double* Value)

Herror T_determinant_matrix(const Htuple MatrixID, const Htuple MatrixType, Htuple* Value)

Herror determinant_matrix(const HTuple& MatrixID, const HTuple& MatrixType, double* Value)

double HMatrix::DeterminantMatrix(const HTuple& MatrixType) const

void HOperatorSetX.DeterminantMatrix(
[in] VARIANT MatrixID, [in] VARIANT MatrixType, [out] VARIANT* Value)

double HMatrixX.DeterminantMatrix([in] BSTR MatrixType)

static void HOperatorSet.DeterminantMatrix(HTuple matrixID, HTuple matrixType, out HTuple value)

double HMatrix.DeterminantMatrix(string matrixType)

Description

The operator determinant_matrixdeterminant_matrixdeterminant_matrixDeterminantMatrixDeterminantMatrix computes the determinant of the input MatrixMatrixMatrixMatrixmatrix given by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixID. The type of the input MatrixMatrixMatrixMatrixmatrix can be selected via the parameter MatrixTypeMatrixTypeMatrixTypeMatrixTypematrixType. The following values are supported: 'general'"general""general""general""general" for general, 'symmetric'"symmetric""symmetric""symmetric""symmetric" for symmetric, 'positive_definite'"positive_definite""positive_definite""positive_definite""positive_definite" for symmetric positive definite, 'tridiagonal'"tridiagonal""tridiagonal""tridiagonal""tridiagonal" for tridiagonal, 'upper_triangular'"upper_triangular""upper_triangular""upper_triangular""upper_triangular" for upper triangular, 'permuted_upper_triangular'"permuted_upper_triangular""permuted_upper_triangular""permuted_upper_triangular""permuted_upper_triangular" for permuted upper triangular, 'lower_triangular'"lower_triangular""lower_triangular""lower_triangular""lower_triangular" for lower triangular, and 'permuted_lower_triangular'"permuted_lower_triangular""permuted_lower_triangular""permuted_lower_triangular""permuted_lower_triangular" for permuted lower triangular matrices. The formula for the calculation of the result is:

  ValueValueValueValuevalue = det MatrixMatrixMatrixMatrixmatrix.

Example:


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

Attention

For MatrixTypeMatrixTypeMatrixTypeMatrixTypematrixType = 'symmetric'"symmetric""symmetric""symmetric""symmetric", 'positive_definite'"positive_definite""positive_definite""positive_definite""positive_definite", or 'upper_triangular'"upper_triangular""upper_triangular""upper_triangular""upper_triangular" the upper triangular part of the input MatrixMatrixMatrixMatrixmatrix must contain the relevant information of the matrix. The strictly lower triangular part of the matrix is not referenced. For MatrixTypeMatrixTypeMatrixTypeMatrixTypematrixType = 'lower_triangular'"lower_triangular""lower_triangular""lower_triangular""lower_triangular" the lower triangular part of the input MatrixMatrixMatrixMatrixmatrix must contain the relevant information of the matrix. The strictly upper triangular part of the matrix is not referenced. For MatrixTypeMatrixTypeMatrixTypeMatrixTypematrixType = 'tridiagonal'"tridiagonal""tridiagonal""tridiagonal""tridiagonal", only the main diagonal, the superdiagonal, and the subdiagonal of the input MatrixMatrixMatrixMatrixmatrix are used. The other parts of the matrix are not referenced. If the referenced part of the input MatrixMatrixMatrixMatrixmatrix is not of the specified type, an exception is raised.

Parallelization

Parameters

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

Matrix handle of the input matrix.

MatrixTypeMatrixTypeMatrixTypeMatrixTypematrixType (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

The type of the input matrix.

Default value: 'general' "general" "general" "general" "general"

List of values: 'general'"general""general""general""general", 'symmetric'"symmetric""symmetric""symmetric""symmetric", 'positive_definite'"positive_definite""positive_definite""positive_definite""positive_definite", 'tridiagonal'"tridiagonal""tridiagonal""tridiagonal""tridiagonal", 'upper_triangular'"upper_triangular""upper_triangular""upper_triangular""upper_triangular", 'permuted_upper_triangular'"permuted_upper_triangular""permuted_upper_triangular""permuted_upper_triangular""permuted_upper_triangular", 'lower_triangular'"lower_triangular""lower_triangular""lower_triangular""lower_triangular", 'permuted_lower_triangular'"permuted_lower_triangular""permuted_lower_triangular""permuted_lower_triangular""permuted_lower_triangular"

ValueValueValueValuevalue (output_control)  real HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Determinant of the input matrix.

Result

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

Possible Predecessors

create_matrixcreate_matrixcreate_matrixCreateMatrixCreateMatrix

References

David Poole: “Linear Algebra: A Modern Introduction”; Thomson; Belmont; 2006.
Gene H. Golub, Charles F. van Loan: “Matrix Computations”; The Johns Hopkins University Press; Baltimore and London; 1996.

Module

Foundation


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