sisi4s
Loading...
Searching...
No Matches
IterativePseudoInverse.hpp
Go to the documentation of this file.
1#ifndef ITERATIVE_PSEUDO_INVERSE_DEFINED
2#define ITERATIVE_PSEUDO_INVERSE_DEFINED
3
4#include <math/Complex.hpp>
5#include <DryTensor.hpp>
6#include <util/Tensor.hpp>
7#include <random>
8
9namespace sisi4s {
10template <typename F>
12public:
13 IterativePseudoInverse(Tensor<F> const &matrix, F accuracy = 1e-10);
14 Tensor<F> &get();
15
16 static void test(CTF::World *world);
17
18protected:
19 void iterate(F accuracy = 1e-10);
20 void iterateQuadratically(F accuracy = 1e-10);
21 static void setRandom(F &value,
22 std::mt19937 &random,
23 std::normal_distribution<F> &normalDistribution);
25
29};
30
31template <typename F>
33public:
36
37protected:
40};
41} // namespace sisi4s
42
43#endif
Definition IterativePseudoInverse.hpp:32
DryTensor< F > square
Definition IterativePseudoInverse.hpp:39
DryTensor< F > matrix
Definition IterativePseudoInverse.hpp:38
DryTensor< F > & get()
Definition IterativePseudoInverse.cxx:217
DryTensor< F > inverse
Definition IterativePseudoInverse.hpp:39
Definition DryTensor.hpp:36
Definition IterativePseudoInverse.hpp:11
Tensor< F > & get()
Definition IterativePseudoInverse.cxx:131
static void test(CTF::World *world)
Definition IterativePseudoInverse.cxx:156
void iterateQuadratically(F accuracy=1e-10)
Definition IterativePseudoInverse.cxx:102
F alpha
Definition IterativePseudoInverse.hpp:28
Tensor< F > inverse
Definition IterativePseudoInverse.hpp:27
void iterate(F accuracy=1e-10)
Definition IterativePseudoInverse.cxx:62
Tensor< F > matrix
Definition IterativePseudoInverse.hpp:26
static void generateHilbertMatrix(Tensor< F > &matrix)
Definition IterativePseudoInverse.cxx:141
Tensor< F > square
Definition IterativePseudoInverse.hpp:27
static void setRandom(F &value, std::mt19937 &random, std::normal_distribution< F > &normalDistribution)
Definition Algorithm.hpp:10
CTF::Tensor< F > Tensor
Definition Tensor.hpp:9