VTK  9.4.20241112
Static Public Member Functions | List of all members
vtkMatrixUtilities::Mapper< RowsT, ColsT, LayoutT > Struct Template Reference

This class is a helper class to compute at compile time the index of a matrix stored as a 1D array from its 2D coordinates. More...

#include <vtkMatrixUtilities.h>

Static Public Member Functions

template<int RowT, int ColT>
static constexpr int GetIndex ()
 

Detailed Description

template<int RowsT, int ColsT, class LayoutT = Layout::Identity>
struct vtkMatrixUtilities::Mapper< RowsT, ColsT, LayoutT >

This class is a helper class to compute at compile time the index of a matrix stored as a 1D array from its 2D coordinates.

This class maps matrices of dimension RowsT x ColsT. The LayoutT template parameter permits to switch to the indexing of the transpose of the matrix. LayoutT can be set to Layout::Identity for a row-wise ordering, or to Layout::Transpose for a column-wise ordering

Warning
This mapper does not work with matrices stored as 2D arrays, or with diagonal matrices.

Definition at line 252 of file vtkMatrixUtilities.h.

Member Function Documentation

◆ GetIndex()

template<int RowsT, int ColsT, class LayoutT = Layout::Identity>
template<int RowT, int ColT>
static constexpr int vtkMatrixUtilities::Mapper< RowsT, ColsT, LayoutT >::GetIndex ( )
inlinestaticconstexpr

Definition at line 255 of file vtkMatrixUtilities.h.


The documentation for this struct was generated from the following file: