#pragma once #include "fesa/math/vector.hpp" #include #include namespace fesa { // Owns row-major contiguous dense storage independently of sparse matrices. class Matrix { public: Matrix(std::size_t rows, std::size_t columns, double value = 0.0); Matrix(const Matrix& other); Matrix(Matrix&& other) noexcept; Matrix& operator=(const Matrix& other); Matrix& operator=(Matrix&& other) noexcept; std::size_t rows() const noexcept; std::size_t columns() const noexcept; double& operator()(std::size_t row, std::size_t column); const double& operator()(std::size_t row, std::size_t column) const; Vector multiply(const Vector& rhs) const; Matrix multiply(const Matrix& rhs) const; private: std::size_t rows_; std::size_t columns_; std::vector values_; }; } // namespace fesa