diff options
Diffstat (limited to 'hadamard_mcmc.hpp')
-rw-r--r-- | hadamard_mcmc.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hadamard_mcmc.hpp b/hadamard_mcmc.hpp index 107622a..634b822 100644 --- a/hadamard_mcmc.hpp +++ b/hadamard_mcmc.hpp @@ -68,6 +68,17 @@ public: } } } + + double operator*(const Orthogonal& o2) const { + const Orthogonal& o1 = *this; + double total = 0; + for (unsigned i = 0; i < this->size(); i++) { + for (unsigned j = 0; j < this->size(); j++) { + total += o1(i, j) * o2(i, j); + } + } + return total; + } }; class Givens { |