OpenVDB  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
Mat< SIZE, T > Class Template Reference

#include <Mat.h>

Inherited by Mat3< double >.

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::v8_0::math::Mat< SIZE, T >

A base class for square matrices.

Member Typedef Documentation

using value_type = T
using ValueType = T

Member Enumeration Documentation

enum SIZE_
Enumerator
size 

Constructor & Destructor Documentation

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

T absMax ( ) const
inline

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

T* asPointer ( )
inline

Direct access to the internal data.

const T* asPointer ( ) const
inline
bool isFinite ( ) const
inline

True if no Nan or Inf values are present.

bool isInfinite ( ) const
inline

True if an Inf is present in this matrix.

bool isNan ( ) const
inline

True if a Nan is present in this matrix.

bool isZero ( ) const
inline

True if all elements are exactly zero.

static unsigned numColumns ( )
inlinestatic
static unsigned numElements ( )
inlinestatic
static unsigned numRows ( )
inlinestatic
T* operator[] ( int  i)
inline

Array style reference to ith row.

const T* operator[] ( int  i) const
inline

Array style reference to ith row.

void read ( std::istream &  is)
inline
std::string 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]]

void write ( std::ostream &  os) const
inline

Friends And Related Function Documentation

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

Write a Mat to an output stream.

Member Data Documentation

T mm[SIZE *SIZE]
protected

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