VTK-m  2.0
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
vtkm::Matrix< T, NumRow, NumCol > Class Template Reference

Basic Matrix type. More...

#include <Matrix.h>

Public Types

using ComponentType = T
 

Public Member Functions

VTKM_EXEC_CONT Matrix ()
 
VTKM_EXEC_CONT Matrix (const ComponentType &value)
 
const VTKM_EXEC_CONT vtkm::Vec< ComponentType, NUM_COLUMNS > & operator[] (vtkm::IdComponent rowIndex) const
 Brackets are used to reference a matrix like a 2D array (i.e. More...
 
VTKM_EXEC_CONT vtkm::Vec< ComponentType, NUM_COLUMNS > & operator[] (vtkm::IdComponent rowIndex)
 Brackets are used to referens a matrix like a 2D array i.e. More...
 
const VTKM_EXEC_CONT ComponentTypeoperator() (vtkm::IdComponent rowIndex, vtkm::IdComponent colIndex) const
 Parentheses are used to reference a matrix using mathematical tuple notation i.e. More...
 
VTKM_EXEC_CONT ComponentTypeoperator() (vtkm::IdComponent rowIndex, vtkm::IdComponent colIndex)
 Parentheses are used to reference a matrix using mathematical tuple notation i.e. More...
 

Static Public Attributes

static constexpr vtkm::IdComponent NUM_ROWS = NumRow
 
static constexpr vtkm::IdComponent NUM_COLUMNS = NumCol
 

Private Attributes

vtkm::Vec< vtkm::Vec< ComponentType, NUM_COLUMNS >, NUM_ROWSComponents
 

Detailed Description

template<typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
class vtkm::Matrix< T, NumRow, NumCol >

Basic Matrix type.

The Matrix class holds a small two dimensional array for simple linear algebra and vector operations. VTK-m provides several Matrix-based operations to assist in visualization computations.

A Matrix is not intended to hold very large arrays. Rather, they are a per-thread data structure to hold information like geometric transforms and tensors.

Member Typedef Documentation

◆ ComponentType

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
using vtkm::Matrix< T, NumRow, NumCol >::ComponentType = T

Constructor & Destructor Documentation

◆ Matrix() [1/2]

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Matrix< T, NumRow, NumCol >::Matrix ( )
inline

◆ Matrix() [2/2]

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Matrix< T, NumRow, NumCol >::Matrix ( const ComponentType value)
inlineexplicit

Member Function Documentation

◆ operator()() [1/2]

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT ComponentType& vtkm::Matrix< T, NumRow, NumCol >::operator() ( vtkm::IdComponent  rowIndex,
vtkm::IdComponent  colIndex 
)
inline

Parentheses are used to reference a matrix using mathematical tuple notation i.e.

matrix(row,column).

◆ operator()() [2/2]

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
const VTKM_EXEC_CONT ComponentType& vtkm::Matrix< T, NumRow, NumCol >::operator() ( vtkm::IdComponent  rowIndex,
vtkm::IdComponent  colIndex 
) const
inline

Parentheses are used to reference a matrix using mathematical tuple notation i.e.

matrix(row,column).

◆ operator[]() [1/2]

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Vec<ComponentType, NUM_COLUMNS>& vtkm::Matrix< T, NumRow, NumCol >::operator[] ( vtkm::IdComponent  rowIndex)
inline

Brackets are used to referens a matrix like a 2D array i.e.

matrix[row][column].

◆ operator[]() [2/2]

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
const VTKM_EXEC_CONT vtkm::Vec<ComponentType, NUM_COLUMNS>& vtkm::Matrix< T, NumRow, NumCol >::operator[] ( vtkm::IdComponent  rowIndex) const
inline

Brackets are used to reference a matrix like a 2D array (i.e.

matrix[row][column]).

Member Data Documentation

◆ Components

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
vtkm::Vec<vtkm::Vec<ComponentType, NUM_COLUMNS>, NUM_ROWS> vtkm::Matrix< T, NumRow, NumCol >::Components
private

◆ NUM_COLUMNS

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
constexpr vtkm::IdComponent vtkm::Matrix< T, NumRow, NumCol >::NUM_COLUMNS = NumCol
staticconstexpr

◆ NUM_ROWS

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
constexpr vtkm::IdComponent vtkm::Matrix< T, NumRow, NumCol >::NUM_ROWS = NumRow
staticconstexpr

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