diff options
| author | y-jan137 <yousefjan24000@gmail.com> | 2026-03-15 11:16:49 +0300 |
|---|---|---|
| committer | y-jan137 <yousefjan24000@gmail.com> | 2026-03-15 11:16:49 +0300 |
| commit | be01607041d2ded41e5bf39a0a8e17ffb9bcc296 (patch) | |
| tree | 12857bb0c9c360fecc23534a1c4185d0b27972e5 /examples/matmul.cpp | |
| parent | b11123e1cd710c135d9924f263ab1808cd96c8c2 (diff) | |
Add QR iteration and cleanup
Diffstat (limited to 'examples/matmul.cpp')
| -rw-r--r-- | examples/matmul.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/examples/matmul.cpp b/examples/matmul.cpp deleted file mode 100644 index c6245f3..0000000 --- a/examples/matmul.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "matrix.hpp" - -#include <iomanip> -#include <iostream> - -int main() { - const linalg::Matrix a{ - {1.0, 2.0, 3.0}, - {4.0, 5.0, 6.0} - }; - const linalg::Matrix b{ - {7.0, 8.0}, - {9.0, 10.0}, - {11.0, 12.0} - }; - - const linalg::Matrix c = a * b; - - std::cout << "Matrix multiplication\n"; - std::cout << "A is " << a.rows() << " x " << a.cols() << '\n'; - std::cout << "B is " << b.rows() << " x " << b.cols() << '\n'; - std::cout << "C = A * B:\n"; - - for (std::size_t i = 0; i < c.rows(); ++i) { - for (std::size_t j = 0; j < c.cols(); ++j) { - std::cout << std::fixed << std::setprecision(2) << c(i, j) - << (j + 1 == c.cols() ? '\n' : ' '); - } - } - - return 0; -} |