VTK-m  2.2
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

 Matrix ()
 Creates an uninitialized matrix. The values in the matrix are not determined. More...
 
 Matrix (const ComponentType &value)
 Creates a matrix initialized with all values set to the provided value. More...
 
const 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::Vec< ComponentType, NUM_COLUMNS > & operator[] (vtkm::IdComponent rowIndex)
 Brackets are used to referens a matrix like a 2D array i.e. More...
 
const ComponentTypeoperator() (vtkm::IdComponent rowIndex, vtkm::IdComponent colIndex) const
 Parentheses are used to reference a matrix using mathematical tuple notation i.e. More...
 
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::Matrix< T, NumRow, NumCol >::Matrix ( )
inline

Creates an uninitialized matrix. The values in the matrix are not determined.

◆ Matrix() [2/2]

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

Creates a matrix initialized with all values set to the provided value.

Member Function Documentation

◆ operator()() [1/2]

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
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 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::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::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: