> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MatrixEigenSym Class Reference

Part of [tmath](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__tmath)

Eigen decomposition of symmetric matrices.

## Public Types

| Type | Name |
| - | - |
|  typedef Eigen::Matrix\< [TScalar](#ad33f729eda6e45412aac71cee702012f), Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > | [Base](#a973c5b26a9107f3517a08587cff16bd2) the Eigen matrix type we refer to |
|  typedef Eigen::Matrix\< [TScalar](#ad33f729eda6e45412aac71cee702012f), Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > | [Base2](#a7a0768641f04f51b58ea111f6f428b00) the Eigen matrix type which is used by the Eigen solvers |
|  typedef int | [TIndex](#a31525d7455891e23040ebb9f024548be) index type of Eigen matrices |
|  typedef number | [TScalar](#ad33f729eda6e45412aac71cee702012f) the scalar tyta type of matrix elements |
|  typedef Eigen::SelfAdjointEigenSolver\< [Base2](#a7a0768641f04f51b58ea111f6f428b00) > | [TSolver](#a05acf22c9e13df2dd8a0889f3a82984a) the solver type for standard eigenvalue problem |
|  typedef Eigen::GeneralizedSelfAdjointEigenSolver\< [Base2](#a7a0768641f04f51b58ea111f6f428b00) > | [TSolverGeneralized](#acf57bed8d1be5d670c004a0b9561a689) the solver type for generalized eigenvalue problem |

## Public Member Functions

| Type | Name |
| - | - |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [\_\_pow\_\_](#ac1a7734bfd755f5b20891adbda2e5ae3) ([TScalar](#ad33f729eda6e45412aac71cee702012f) exponent) const operator ^(scalar) in scripting languages by SWIG |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [Eigenvalues](#a2559d3424ae4c46803b8d9cfd34248b3) () const |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [Eigenvectors](#a77aadddc0daef135a3e8ee7bdc5e077b) () const |
| bool | [EigenvectorsAvailable](#abe0ed699d6b4ae6111af006ad979112c) () const |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [Exp](#a87f6fab7e3fe95960eaeb1b498c93e07) () |
| bool | [IsGeneralEigenproblem](#a390d11bc9bb6b0a596e78b2fd79a9f04) () const |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [Log](#a51da26cb713f8a3acf7856fba158ed60) () |
| | [MatrixEigenSym](#aabca9a521f03b111946075607efd5abf) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) \_object, bool computevectors=true) destructor |
| | [MatrixEigenSym](#a3ccaac89fc3bd7623579777afba85371) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) \_object, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) mass, bool computevectors=true) constructor of a generalized eigenvalue problem |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [OperatorInverseSqrt](#a635c08172a091d0965aaa27c94c13800) () const |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [OperatorSqrt](#ad4dd9c8bbfecd5a7634ef3c542e05cbf) () const |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [Pow](#af79633a1270172c5f549fa393c4e7856) ([TScalar](#ad33f729eda6e45412aac71cee702012f) exponent) |

## Detailed Description

Eigen decomposition of symmetric matrices.

This class provides an Eigen decomposition of symmetric matrices. At construction, it factorizes the given matrix and stores eigenvalues and (if asked for) eigenvectors. The constructor accepts either the standard eigenvalues problem (of a single symmetric matrix) or the generalized eigenvalue problem (of 2 symmetric matrices).

The class is equipped with methods and arithmetic operators which provide the

* matrix exponential
* matrix power
* matrix logarithm
* matrix square root using the full decomposition.

## Constructor & Destructor Documentation

### MatrixEigenSym() \[1/2]

```cpp theme={null}
MatrixEigenSym(
    Matrix _object,
    bool computevectors = true
)
```

destructor

constructor of a standard eigenvalue problem

**Parameters**

| Name | Description |
| - | - |
| \_object | the matrix to be decomposed |
| computevectors | if true, then also the eigenvectors are computed. else only eigenvalues |

### MatrixEigenSym() \[2/2]

```cpp theme={null}
MatrixEigenSym(
    Matrix _object,
    Matrix mass,
    bool computevectors = true
)
```

constructor of a generalized eigenvalue problem

**Parameters**

| Name | Description |
| - | - |
| \_object | the matrix to be decomposed, eg. the stiffness matrix |
| mass | the second matrix, eg. the mass matrix |
| computevectors | if true, then also the eigenvectors are computed. else only eigenvalues |

## Member Function Documentation

### \_\_pow\_\_()

```cpp theme={null}
Matrix __pow__(TScalar exponent) const
```

operator ^(scalar) in scripting languages by SWIG

**Returns**

the power of the matrix, i.e. $ A^n$ \$

**Parameters**

| Name | Description |
| - | - |
| exponent | the exponent $n$ |

### Eigenvalues()

```cpp theme={null}
Matrix Eigenvalues() const
```

**Returns**

the eigenvalues as vector

### Eigenvectors()

```cpp theme={null}
Matrix Eigenvectors() const
```

**Returns**

the normalized complex eigenvectors as a matrix of column vectors.

### EigenvectorsAvailable()

```cpp theme={null}
bool EigenvectorsAvailable() const
```

**Returns**

m\_eigenvectorsAvailable

### Exp()

```cpp theme={null}
Matrix Exp()
```

**Returns**

the exponential of the matrix

### IsGeneralEigenproblem()

```cpp theme={null}
bool IsGeneralEigenproblem() const
```

**Returns**

m\_isGeneralEigenproblem

### Log()

```cpp theme={null}
Matrix Log()
```

**Returns**

the logarithm of the matrix

### OperatorInverseSqrt()

```cpp theme={null}
Matrix OperatorInverseSqrt() const
```

**Returns**

the positive inverse square root of the matrix (if positive definite)

### OperatorSqrt()

```cpp theme={null}
Matrix OperatorSqrt() const
```

**Returns**

the positive square root of the matrix (if positive definite)

### Pow()

```cpp theme={null}
Matrix Pow(TScalar exponent)
```

**Returns**

the power of the matrix, i.e. $ A^n$ \$

**Parameters**

| Name | Description |
| - | - |
| exponent | the exponent $n$ |
