Loading...
Searching...
No Matches
Mat< SIZE, T > Class Template Reference

`#include <openvdb/math/Mat.h>`

Inheritance diagram for 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.
const T * | asPointer () const
T * | operator[] (int i)
| Array style reference to ith row.
const T * | operator[] (int i) const
void | write (std::ostream &os) const
void | read (std::istream &is)
T | absMax () const
| Return the maximum of the absolute of all elements in this matrix.
bool | isNan () const
| True if a Nan is present in this matrix.
bool | isInfinite () const
| True if an Inf is present in this matrix.
bool | isFinite () const
| True if no Nan or Inf values are present.
bool | isZero () const
| True if all elements are exactly zero.

## Static Public Member Functions

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

## Protected Attributes

T | mm [SIZE *SIZE]

## Friends

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

## Detailed Description

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

A base class for square matrices.

## Member Typedef Documentation

## value_type

template<unsigned SIZE, typename T >

using value_type = T

## ValueType

template<unsigned SIZE, typename T >

using ValueType = T

## Member Enumeration Documentation

## SIZE_

template<unsigned SIZE, typename T >

enum SIZE_

Enumerator
size |

## Constructor & Destructor Documentation

## Mat()

template<unsigned SIZE, typename 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

## absMax()

template<unsigned SIZE, typename T >

T absMax | ( |  | ) | const

inline

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

## asPointer() [1/2]

template<unsigned SIZE, typename T >

T * asPointer | ( |  | ) |

inline

Direct access to the internal data.

## asPointer() [2/2]

template<unsigned SIZE, typename T >

const T * asPointer | ( |  | ) | const

inline

## isFinite()

template<unsigned SIZE, typename T >

bool isFinite | ( |  | ) | const

inline

True if no Nan or Inf values are present.

## isInfinite()

template<unsigned SIZE, typename T >

bool isInfinite | ( |  | ) | const

inline

True if an Inf is present in this matrix.

## isNan()

template<unsigned SIZE, typename T >

bool isNan | ( |  | ) | const

inline

True if a Nan is present in this matrix.

## isZero()

template<unsigned SIZE, typename T >

bool isZero | ( |  | ) | const

inline

True if all elements are exactly zero.

## numColumns()

template<unsigned SIZE, typename T >

static unsigned numColumns | ( |  | ) |

inlinestatic

## numElements()

template<unsigned SIZE, typename T >

static unsigned numElements | ( |  | ) |

inlinestatic

## numRows()

template<unsigned SIZE, typename T >

static unsigned numRows | ( |  | ) |

inlinestatic

## operator[]() [1/2]

template<unsigned SIZE, typename T >

T * operator[] | ( | int | i | ) |

inline

Array style reference to ith row.

## operator[]() [2/2]

template<unsigned SIZE, typename T >

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

inline

## read()

template<unsigned SIZE, typename T >

void read | ( | std::istream & | is | ) |

inline

## str()

template<unsigned SIZE, typename T >

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]]

## write()

template<unsigned SIZE, typename T >

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

inline

## Friends And Related Symbol Documentation

## operator<<

template<unsigned SIZE, typename T >

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

friend

Write a Mat to an output stream.

## Member Data Documentation

## mm

template<unsigned SIZE, typename T >

T mm[SIZE *SIZE]

protected