rotgen/include/rotgen/impl/matrix_impl64.hpp
2025-05-12 11:33:38 +02:00

44 lines
1.3 KiB
C++

//==================================================================================================
/*
ROTGEN - Runtime Overlay for Eigen
Copyright : CODE RECKONS
SPDX-License-Identifier: BSL-1.0
*/
//==================================================================================================
#pragma once
#include <memory>
#include <cstddef>
namespace rotgen
{
class matrix_impl64
{
public:
matrix_impl64(std::size_t rows = 0, std::size_t cols = 0);
matrix_impl64(matrix_impl64 const& other);
matrix_impl64& operator=(matrix_impl64 const& other);
matrix_impl64(matrix_impl64&&) noexcept;
matrix_impl64& operator=(matrix_impl64&&) noexcept;
~matrix_impl64();
std::size_t rows() const;
std::size_t cols() const;
double& operator()(std::size_t i, std::size_t j);
double const& operator()(std::size_t i, std::size_t j) const;
matrix_impl64& operator+=(matrix_impl64 const& rhs);
matrix_impl64& operator*=(matrix_impl64 const& rhs);
matrix_impl64& operator*=(double d);
friend std::ostream& operator<<(std::ostream&,matrix_impl64 const&);
friend bool operator==(matrix_impl64 const& lhs, matrix_impl64 const& rhs);
private:
struct payload;
std::unique_ptr<payload> storage_;
};
}