imate
C++/CUDA Reference
Loading...
Searching...
No Matches
diagonalization.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3 * SPDX-License-Identifier: BSD-3-Clause
4 * SPDX-FileType: SOURCE
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the license found in the LICENSE.txt file in the root
8 * directory of this source tree.
9 */
10
11
12#ifndef _C_TRACE_ESTIMATOR_DIAGONALIZATION_H_
13#define _C_TRACE_ESTIMATOR_DIAGONALIZATION_H_
14
15// =======
16// Headers
17// =======
18
19#include "../_definitions/types.h" // IndexType
20
21
22// ===============
23// Diagonalization
24// ===============
25
33
34template <typename DataType>
36{
37 public:
38
39 // eigh tridiagonal
40 static int eigh_tridiagonal(
41 DataType* diagonals,
42 DataType* subdiagonals,
43 DataType* eigenvectors,
44 IndexType matrix_size);
45
46 // svd bidiagonal
47 static int svd_bidiagonal(
48 DataType* diagonals,
49 DataType* subdiagonals,
50 DataType* U,
51 DataType* Vt,
52 IndexType matrix_size);
53};
54
55#endif // _C_TRACE_ESTIMATOR_DIAGONALIZATION_H_
A static class to find eigenvalues and eigenvectors (diagonalize) tridiagonal and bidiagonal matrices...
static int eigh_tridiagonal(DataType *diagonals, DataType *subdiagonals, DataType *eigenvectors, IndexType matrix_size)
Computes all eigenvalues and eigenvectors of a real and symmetric tridiagonal matrix.
static int svd_bidiagonal(DataType *diagonals, DataType *subdiagonals, DataType *U, DataType *Vt, IndexType matrix_size)
Computes all singular-values and left and right eigenvectors of a real and symmetric upper bi-diagona...
int IndexType
Definition types.h:65