VTK-m  2.0
Classes | Namespaces | Functions
Matrix.h File Reference
#include <vtkm/Assert.h>
#include <vtkm/Math.h>
#include <vtkm/TypeTraits.h>
#include <vtkm/Types.h>
#include <vtkm/VecTraits.h>

Go to the source code of this file.

Classes

class  vtkm::Matrix< T, NumRow, NumCol >
 Basic Matrix type. More...
 
struct  vtkm::TypeTraitsMatrixTag
 Tag used to identify 2 dimensional types (matrices). More...
 
struct  vtkm::TypeTraits< vtkm::Matrix< T, NumRow, NumCol > >
 
struct  vtkm::VecTraits< vtkm::Matrix< T, NumRow, NumCol > >
 A matrix has vector traits to implement component-wise operations. More...
 

Namespaces

 vtkm
 Groups connected points that have the same field value.
 

Functions

template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
const VTKM_EXEC_CONT vtkm::Vec< T, NumCol > & vtkm::MatrixGetRow (const vtkm::Matrix< T, NumRow, NumCol > &matrix, vtkm::IdComponent rowIndex)
 Returns a tuple containing the given row (indexed from 0) of the given matrix. More...
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Vec< T, NumRow > vtkm::MatrixGetColumn (const vtkm::Matrix< T, NumRow, NumCol > &matrix, vtkm::IdComponent columnIndex)
 Returns a tuple containing the given column (indexed from 0) of the given matrix. More...
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT void vtkm::MatrixSetRow (vtkm::Matrix< T, NumRow, NumCol > &matrix, vtkm::IdComponent rowIndex, const vtkm::Vec< T, NumCol > &rowValues)
 Convenience function for setting a row of a matrix. More...
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT void vtkm::MatrixSetColumn (vtkm::Matrix< T, NumRow, NumCol > &matrix, vtkm::IdComponent columnIndex, const vtkm::Vec< T, NumRow > &columnValues)
 Convenience function for setting a column of a matrix. More...
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol, vtkm::IdComponent NumInternal>
VTKM_EXEC_CONT vtkm::Matrix< T, NumRow, NumCol > vtkm::MatrixMultiply (const vtkm::Matrix< T, NumRow, NumInternal > &leftFactor, const vtkm::Matrix< T, NumInternal, NumCol > &rightFactor)
 Standard matrix multiplication. More...
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Vec< T, NumRow > vtkm::MatrixMultiply (const vtkm::Matrix< T, NumRow, NumCol > &leftFactor, const vtkm::Vec< T, NumCol > &rightFactor)
 Standard matrix-vector multiplication. More...
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Vec< T, NumCol > vtkm::MatrixMultiply (const vtkm::Vec< T, NumRow > &leftFactor, const vtkm::Matrix< T, NumRow, NumCol > &rightFactor)
 Standard vector-matrix multiplication. More...
 
template<typename T , vtkm::IdComponent Size>
VTKM_EXEC_CONT vtkm::Matrix< T, Size, Size > vtkm::MatrixIdentity ()
 Returns the identity matrix. More...
 
template<typename T , vtkm::IdComponent Size>
VTKM_EXEC_CONT void vtkm::MatrixIdentity (vtkm::Matrix< T, Size, Size > &matrix)
 Fills the given matrix with the identity matrix. More...
 
template<typename T , vtkm::IdComponent NumRows, vtkm::IdComponent NumCols>
VTKM_EXEC_CONT vtkm::Matrix< T, NumCols, NumRows > vtkm::MatrixTranspose (const vtkm::Matrix< T, NumRows, NumCols > &matrix)
 Returns the transpose of the given matrix. More...
 
template<typename T , vtkm::IdComponent Size>
VTKM_EXEC_CONT vtkm::Vec< T, Size > vtkm::SolveLinearSystem (const vtkm::Matrix< T, Size, Size > &A, const vtkm::Vec< T, Size > &b, bool &valid)
 Solve the linear system Ax = b for x. More...
 
template<typename T , vtkm::IdComponent Size>
VTKM_EXEC_CONT vtkm::Matrix< T, Size, Size > vtkm::MatrixInverse (const vtkm::Matrix< T, Size, Size > &A, bool &valid)
 Find and return the inverse of the given matrix. More...
 
template<typename T , vtkm::IdComponent Size>
VTKM_EXEC_CONTvtkm::MatrixDeterminant (const vtkm::Matrix< T, Size, Size > &A)
 Compute the determinant of a matrix. More...
 
template<typename T >
VTKM_EXEC_CONTvtkm::MatrixDeterminant (const vtkm::Matrix< T, 1, 1 > &A)
 
template<typename T >
VTKM_EXEC_CONTvtkm::MatrixDeterminant (const vtkm::Matrix< T, 2, 2 > &A)
 
template<typename T >
VTKM_EXEC_CONTvtkm::MatrixDeterminant (const vtkm::Matrix< T, 3, 3 > &A)
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT bool vtkm::operator== (const vtkm::Matrix< T, NumRow, NumCol > &a, const vtkm::Matrix< T, NumRow, NumCol > &b)
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT bool vtkm::operator!= (const vtkm::Matrix< T, NumRow, NumCol > &a, const vtkm::Matrix< T, NumRow, NumCol > &b)
 
template<typename T , vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_CONT std::ostream & vtkm::operator<< (std::ostream &stream, const vtkm::Matrix< T, NumRow, NumCol > &mat)
 Helper function for printing out matricies during testing. More...