HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T > Class Template Reference

#include <Mat.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >:

Public Types

enum  SIZE_ { size = SIZE }
 
using value_type = T
 
using ValueType = T
 

Public Member Functions

 Mat ()=default
 
std::string str (unsigned indentation=0) const
 
T * asPointer ()
 Direct access to the internal data. More...
 
const T * asPointer () const
 
void write (std::ostream &os) const
 
void read (std::istream &is)
 
absMax () const
 Return the maximum of the absolute of all elements in this matrix. More...
 
bool isNan () const
 True if a Nan is present in this matrix. More...
 
bool isInfinite () const
 True if an Inf is present in this matrix. More...
 
bool isFinite () const
 True if no Nan or Inf values are present. More...
 
bool isZero () const
 True if all elements are exactly zero. More...
 
T * operator[] (int i)
 Array style reference to ith row. More...
 
const T * operator[] (int i) const
 Array style reference to ith row. More...
 

Static Public Member Functions

static unsigned numRows ()
 
static unsigned numColumns ()
 
static unsigned numElements ()
 

Protected Attributes

mm [SIZE *SIZE]
 

Friends

std::ostream & operator<< (std::ostream &ostr, const Mat< SIZE, T > &m)
 Write a Mat to an output stream. More...
 

Detailed Description

template<unsigned SIZE, typename T>
class openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >

A base class for square matrices.

Definition at line 26 of file Mat.h.

Member Typedef Documentation

template<unsigned SIZE, typename T>
using openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::value_type = T

Definition at line 29 of file Mat.h.

template<unsigned SIZE, typename T>
using openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::ValueType = T

Definition at line 30 of file Mat.h.

Member Enumeration Documentation

template<unsigned SIZE, typename T>
enum openvdb::OPENVDB_VERSION_NAME::math::Mat::SIZE_
Enumerator
size 

Definition at line 31 of file Mat.h.

Constructor & Destructor Documentation

template<unsigned SIZE, typename T>
openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::Mat ( )
default

Trivial constructor, the matrix is NOT initialized

Note
destructor, copy constructor, assignment operator and move constructor are left to be defined by the compiler (default)

Member Function Documentation

template<unsigned SIZE, typename T>
T openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::absMax ( ) const
inline

Return the maximum of the absolute of all elements in this matrix.

Definition at line 119 of file Mat.h.

template<unsigned SIZE, typename T>
T* openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::asPointer ( )
inline

Direct access to the internal data.

Definition at line 101 of file Mat.h.

template<unsigned SIZE, typename T>
const T* openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::asPointer ( ) const
inline

Definition at line 102 of file Mat.h.

template<unsigned SIZE, typename T>
bool openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::isFinite ( ) const
inline

True if no Nan or Inf values are present.

Definition at line 144 of file Mat.h.

template<unsigned SIZE, typename T>
bool openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::isInfinite ( ) const
inline

True if an Inf is present in this matrix.

Definition at line 136 of file Mat.h.

template<unsigned SIZE, typename T>
bool openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::isNan ( ) const
inline

True if a Nan is present in this matrix.

Definition at line 128 of file Mat.h.

template<unsigned SIZE, typename T>
bool openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::isZero ( ) const
inline

True if all elements are exactly zero.

Definition at line 152 of file Mat.h.

template<unsigned SIZE, typename T>
static unsigned openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::numColumns ( )
inlinestatic

Definition at line 40 of file Mat.h.

template<unsigned SIZE, typename T>
static unsigned openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::numElements ( )
inlinestatic

Definition at line 41 of file Mat.h.

template<unsigned SIZE, typename T>
static unsigned openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::numRows ( )
inlinestatic

Definition at line 39 of file Mat.h.

template<unsigned SIZE, typename T>
T* openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::operator[] ( int  i)
inline

Array style reference to ith row.

Definition at line 106 of file Mat.h.

template<unsigned SIZE, typename T>
const T* openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::operator[] ( int  i) const
inline

Array style reference to ith row.

Definition at line 107 of file Mat.h.

template<unsigned SIZE, typename T>
void openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::read ( std::istream &  is)
inline

Definition at line 114 of file Mat.h.

template<unsigned SIZE, typename T>
std::string openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::str ( unsigned  indentation = 0) const
inline
Returns
string representation of matrix Since output is multiline, optional indentation argument prefixes each newline with that much white space. It does not indent the first line, since you might be calling this inline:

cout << "matrix: " << mat.str(7)

matrix: [[1 2] [3 4]]

Definition at line 53 of file Mat.h.

template<unsigned SIZE, typename T>
void openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::write ( std::ostream &  os) const
inline

Definition at line 110 of file Mat.h.

Friends And Related Function Documentation

template<unsigned SIZE, typename T>
std::ostream& operator<< ( std::ostream &  ostr,
const Mat< SIZE, T > &  m 
)
friend

Write a Mat to an output stream.

Definition at line 92 of file Mat.h.

Member Data Documentation

template<unsigned SIZE, typename T>
T openvdb::OPENVDB_VERSION_NAME::math::Mat< SIZE, T >::mm[SIZE *SIZE]
protected

Definition at line 160 of file Mat.h.


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