46 using MatrixType = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>;
80 [[nodiscard]] Eigen::Index
rows()
const {
83 [[nodiscard]] Eigen::Index
cols()
const {
89 Eigen::Map<MatrixType, Eigen::Aligned128>
mat() {
90 return Eigen::Map<MatrixType, Eigen::Aligned128>(data_.data(), rows_, cols_);
94 Eigen::Map<const MatrixType, Eigen::Aligned128>
mat()
const {
95 return Eigen::Map<const MatrixType, Eigen::Aligned128>(data_.data(), rows_, cols_);
103 Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, 1>, Eigen::Aligned128>
vec() {
104 return Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, 1>, Eigen::Aligned128>(data_.data(), rows_);
108 Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>, Eigen::Aligned128>
vec()
const {
109 return Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>, Eigen::Aligned128>(
110 data_.data(), rows_);
114 Eigen::Index rows_ = 0;
115 Eigen::Index cols_ = 0;
116 std::vector<T, AlignedAllocator<T, kAlignment>> data_;
Eigen::Map< const Eigen::Matrix< T, Eigen::Dynamic, 1 >, Eigen::Aligned128 > vec() const
Const overload of vec().
Eigen::Map< MatrixType, Eigen::Aligned128 > mat()
Returns an aligned, mutable Eigen::Map view of the logical rows() x cols() matrix.
void resizeAndSetZero(Eigen::Index rows, Eigen::Index cols=1)
Sets the logical size to rows x cols and zeroes every element.
Eigen::Map< const MatrixType, Eigen::Aligned128 > mat() const
Const overload of mat().
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > MatrixType
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 >, Eigen::Aligned128 > vec()
Returns an aligned, mutable Eigen::Map view interpreting the storage as a length-rows() column vector...
Eigen::Index cols() const
static constexpr std::size_t kAlignment
Alignment in bytes for the underlying storage.
ResizeableMatrix()=default
Eigen::Index rows() const
ResizeableMatrix(Eigen::Index rows, Eigen::Index cols=1)
Constructs a matrix of the given logical size and zero-initializes all entries.