OpenVDB 5.1.0

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 ()
| Mat (Mat const &src)
| Copy constructor. Used when the class signature matches exactly. More...
Mat & | operator= (Mat const &src)
std::string | str (unsigned indentation=0) 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. 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...

## 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. More...

## Detailed Description

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

A base class for square matrices.

## Member Typedef Documentation

## ◆ value_type

using value_type = T

## ◆ ValueType

using ValueType = T

## Member Enumeration Documentation

## ◆ SIZE_

enum SIZE_

Enumerator
size |

## Constructor & Destructor Documentation

## ◆ Mat() [1/2]

Mat | ( |  | ) |
| inline

Default ctor. Does nothing. Required because declaring a copy (or other) constructor means the default constructor gets left out.

## ◆ Mat() [2/2]

Mat | ( | Mat< SIZE, T > const & | src | ) |
| inline

Copy constructor. Used when the class signature matches exactly.

## Member Function Documentation

## ◆ absMax()

T absMax | ( |  | ) | const
| inline

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

## ◆ isFinite()

bool isFinite | ( |  | ) | const
| inline

True if no Nan or Inf values are present.

## ◆ isInfinite()

bool isInfinite | ( |  | ) | const
| inline

True if an Inf is present in this matrix.

## ◆ isNan()

bool isNan | ( |  | ) | const
| inline

True if a Nan is present in this matrix.

## ◆ isZero()

bool isZero | ( |  | ) | const
| inline

True if all elements are exactly zero.

## ◆ numColumns()

static unsigned numColumns | ( |  | ) |
| inline static

## ◆ numElements()

static unsigned numElements | ( |  | ) |
| inline static

## ◆ numRows()

static unsigned numRows | ( |  | ) |
| inline static

## ◆ operator=()

Mat& operator= | ( | Mat< SIZE, T > const & | src | ) |
| inline

## ◆ read()

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

## ◆ str()

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()

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

## Friends And Related Function Documentation

## ◆ operator<<

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

Write a Mat to an output stream.

## Member Data Documentation

## ◆ mm

T mm[SIZE *SIZE]
| protected

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

- Mat.h