template<class ElementType>
iDynTree::MatrixView class

MatrixView implements a view interface of Matrices.

Both RowMajor and ColumnMajor matrices are supported.

Public types

using element_type = ElementType
using value_type = std::remove_cv_t<ElementType>
using index_type = std::ptrdiff_t
using pointer = element_type*
using reference = element_type&

Constructors, destructors, conversion operators

MatrixView()
MatrixView(const MatrixView& other)
template<class Container, std::enable_if_t<std::is_const<element_type>::value && std::is_convertible<decltype(std::declval<Container>().data()), pointer>::value && MatrixViewInternal::has_IsRowMajor<Container>::value && !std::is_same<Container, MatrixView>::value, int>
MatrixView(const Container& matrix)
template<class Container, std::enable_if_t<std::is_const<element_type>::value && std::is_convertible<decltype(std::declval<Container>().data()), pointer>::value && !MatrixViewInternal::has_IsRowMajor<Container>::value && !std::is_same<Container, MatrixView>::value, int>
MatrixView(const Container& matrix, const MatrixStorageOrdering& order = MatrixStorageOrdering::RowMajor)
template<class Container, std::enable_if_t<std::is_convertible<decltype(std::declval<Container>().data()), pointer>::value && MatrixViewInternal::has_IsRowMajor<Container>::value && !std::is_same<Container, MatrixView>::value, int>
MatrixView(Container& matrix)
template<class Container, std::enable_if_t<std::is_convertible<decltype(std::declval<Container>().data()), pointer>::value && !MatrixViewInternal::has_IsRowMajor<Container>::value && !std::is_same<Container, MatrixView>::value && !std::is_same<Container, MatrixView<std::remove_pointer_t<decltype(std::declval<Container>().data())>>, ::value, int>
MatrixView(Container& matrix, const MatrixStorageOrdering& order = MatrixStorageOrdering::RowMajor)
MatrixView(pointer in_data, index_type in_rows, index_type in_cols, const MatrixStorageOrdering& order = MatrixStorageOrdering::RowMajor)

Public functions

auto operator=(const MatrixView& other) -> MatrixView&
template<class OtherElementType, class = std::enable_if_t< details::is_allowed_element_type_conversion<typename MatrixView<OtherElementType>::value_type, value_type>::value>>
auto MatrixView(const MatrixView<OtherElementType>& other) -> IDYNTREE_CONSTEXPR
auto storageOrder() const -> const MatrixStorageOrdering& noexcept
auto data() const -> pointer noexcept
auto block(index_type startingRow, index_type startingColumn, index_type rows, index_type cols) const -> MatrixView

Matrix interface methods.

Methods exposing a matrix-like interface to MatrixView.

auto operator()(index_type row, const index_type col) const -> reference
auto rows() const -> index_type noexcept
auto cols() const -> index_type noexcept