Files
mql5-skills/skills/mql5/references/docs/06-matrix/0443-matrix-openblas-eigen-values-tridiagonalmatrices-eigentridiagdc.md
T
2026-06-23 21:47:51 +08:00

63 lines
1.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# EigenTridiagonalDC
Compute eigenvalues and eigenvectors of a symmetric tridiagonal matrix using the divide-and-conquer algorithm (LAPACK function [STEVD](https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-fortran/2025-2/stevd.html)).
Computing for type matrix<double>
```
bool  matrix::EigenTridiagonalDC(
   ENUM_EIG_VALUES       jobv,               // compute eigenvectors or not
   vector&               eigen_values,       // vector of computed eigenvalues
   matrix&               eigen_vectors       // matrix of computed eigenvectors
   );
```
Computing for type matrix<float>
```
bool  matrixf::EigenTridiagonalDC(
   ENUM_EIG_VALUES       jobv,               // compute eigenvectors or not
   vectorf&              eigen_values,       // vector of computed eigenvalues
   matrixf&              eigen_vectors       // matrix of computed eigenvectors
   );
```
Parameters
jobv
[in]  ENUM_EIG_VALUES enumeration value which determines the method for computing eigenvectors.
eigen_values
[out] Vector of eigenvalues.
eigen_vectors
[out] Matrix of eigenvectors.
Return Value
Return true if successful, otherwise false in case of an [error](/en/docs/constants/errorswarnings/errorcodes).
Note
Computation depends on the value of the jobv parameter.
When jobv = EIGVALUES_V, eigenvectors and eigenvalues are calculated.
If EIGVALUES_N is set, eigenvectors are not calculated. Only eigenvalues are computed.
The input must be a symmetric matrix in the tridiagonal form.
ENUM_EIG_VALUES
An enumeration that specifies whether to calculate eigenvectors.
| ID | Description |
| --- | --- |
| EIGVALUES_V | Eigenvectors and eigenvalues are calculated. |
| EIGVALUES_N | Only eigenvalues are calculated, without vectors. |