13#ifndef RTCTK_COMPONENTFRAMEWORK_MATRIXSPAN_HPP
14#define RTCTK_COMPONENTFRAMEWORK_MATRIXSPAN_HPP
37 using typename gsl::span<T>::element_type;
38 using typename gsl::span<T>::value_type;
39 using typename gsl::span<T>::size_type;
40 using typename gsl::span<T>::pointer;
42 using typename gsl::span<T>::reference;
44 using typename gsl::span<T>::iterator;
45 using typename gsl::span<T>::reverse_iterator;
55 gsl::span<T>::operator=(
other);
56 m_nrows =
other.m_nrows;
57 m_ncols =
other.m_ncols;
62 : gsl::span<T>(std::forward<MatrixSpan>(
other))
63 , m_nrows(std::move(
other.m_nrows))
64 , m_ncols(std::move(
other.m_ncols)) {
68 gsl::span<T>::operator=(std::forward<MatrixSpan>(
other));
69 m_nrows = std::move(
other.m_nrows);
70 m_ncols = std::move(
other.m_ncols);
75 : gsl::span<T>(data), m_nrows(
n), m_ncols(
m) {
87 : gsl::span<T>(
first,
last), m_nrows(
n), m_ncols(
m) {
91 template <std::
size_t N>
93 : gsl::span<T>(
array), m_nrows(
n), m_ncols(
m) {
97 template <std::
size_t N>
99 : gsl::span<T>(
array), m_nrows(
n), m_ncols(
m) {
103 template <std::
size_t N>
105 : gsl::span<T>(
array), m_nrows(
n), m_ncols(
m) {
109 template <
typename R>
111 : gsl::span<T>(std::forward<R>(
range)), m_nrows(
n), m_ncols(
m) {
115 template <
typename A>
118 , m_nrows(
buffer.GetNrows())
119 , m_ncols(
buffer.GetNcols()) {
127 return gsl::span<T>::operator[](
n * m_ncols +
m);
135 return gsl::span<T>::operator[](
n * m_ncols +
m);
147 return row * m_ncols +
col;
A buffer class representing 2D matrix data.
Definition matrixBuffer.hpp:28
A span referencing a 2D matrix buffer.
Definition matrixSpan.hpp:35
const T & const_reference
Definition matrixSpan.hpp:43
constexpr MatrixSpan(size_type n, size_type m, R &&range) noexcept
Definition matrixSpan.hpp:110
constexpr MatrixSpan(size_type n, size_type m, I first, I last)
Definition matrixSpan.hpp:86
size_type GetNrows() const
Definition matrixSpan.hpp:138
constexpr MatrixSpan(size_type n, size_type m, const gsl::span< T > &data)
Definition matrixSpan.hpp:74
constexpr MatrixSpan(const MatrixSpan &other)
Definition matrixSpan.hpp:50
constexpr MatrixSpan(MatrixBuffer< T, A > &buffer) noexcept
Definition matrixSpan.hpp:116
constexpr MatrixSpan & operator=(const MatrixSpan &other)
Definition matrixSpan.hpp:54
constexpr MatrixSpan(size_type n, size_type m, I first, size_type count)
Definition matrixSpan.hpp:80
constexpr reference operator()(size_type n, size_type m)
Definition matrixSpan.hpp:122
size_type GetNcols() const
Definition matrixSpan.hpp:142
constexpr MatrixSpan(size_type n, size_type m, element_type(&array)[N]) noexcept
Definition matrixSpan.hpp:92
constexpr MatrixSpan() noexcept
Definition matrixSpan.hpp:47
constexpr MatrixSpan(size_type n, size_type m, std::array< T, N > &array) noexcept
Definition matrixSpan.hpp:98
constexpr const_reference operator()(size_type n, size_type m) const
Definition matrixSpan.hpp:130
size_t GetElementIndex(size_t row, size_t col)
Definition matrixSpan.hpp:146
constexpr MatrixSpan(MatrixSpan &&other) noexcept
Definition matrixSpan.hpp:61
constexpr MatrixSpan & operator=(MatrixSpan &&other) noexcept
Definition matrixSpan.hpp:67
const T * const_pointer
Definition matrixSpan.hpp:41
constexpr MatrixSpan(size_type n, size_type m, const std::array< T, N > &array) noexcept
Definition matrixSpan.hpp:104
Declaration of the MatrixBuffer template class used in APIs.
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23