Zivid C++ API 2.9.0+4dbba385-1
Defining the Future of 3D Machine Vision
|
A fixed size matrix in row major order More...
#include <Zivid/Matrix.h>
Public Types | |
using | ValueType = T |
The type stored in the matrix More... | |
using | Iterator = typename Storage::iterator |
The matrix iterator type for mutable access. It iterates over individual matrix elements in row major order. More... | |
using | ConstIterator = typename Storage::const_iterator |
The matrix iterator type for immutable access. It iterates over individual matrix elements in row major order. More... | |
Public Member Functions | |
Matrix ()=default | |
Constructor More... | |
Matrix (const std::string &fileName) | |
Load the matrix from a file More... | |
Matrix (const std::array< T, colCount *rowCount > &arrArr) | |
Constructor More... | |
template<typename Iterator > | |
Matrix (Iterator beginIt, Iterator endIt) | |
Constructor More... | |
Matrix (std::initializer_list< T > values) | |
Constructor More... | |
Matrix (std::initializer_list< std::initializer_list< T > > values) | |
Constructor More... | |
Iterator | begin () |
Iterator to the beginning of the matrix More... | |
Iterator | end () |
Iterator to the end of the matrix More... | |
ConstIterator | begin () const |
Iterator to the beginning of the matrix More... | |
ConstIterator | end () const |
Iterator to the end of the matrix More... | |
ConstIterator | cbegin () const |
Iterator to the beginning of the matrix More... | |
ConstIterator | cend () const |
Iterator to the end of the matrix More... | |
T & | at (size_t row, size_t col) |
Access specified element with bounds checking More... | |
const T & | at (size_t row, size_t col) const |
Access specified element with bounds checking More... | |
T & | operator() (size_t row, size_t col) |
Access specified element without bounds checking More... | |
const T & | operator() (size_t row, size_t col) const |
Access specified element without bounds checking More... | |
T * | data () |
Pointer to the underlying data More... | |
const T * | data () const |
Pointer to the underlying data More... | |
void | save (const std::string &fileName) const |
Save the matrix to the given file More... | |
void | load (const std::string &fileName) |
Load the matrix from the given file More... | |
template<typename Q = T, typename = typename std::enable_if<invertSupported, Q>::type> | |
ZIVID_CORE_EXPORT Matrix | inverse () const |
Get the inverse of this matrix More... | |
std::string | toString () const |
Get string representation of the Matrix More... | |
Static Public Attributes | |
static constexpr size_t | rows { rowCount } |
The number of rows in the matrix More... | |
static constexpr size_t | cols { colCount } |
The number of columns in the matrix More... | |
A fixed size matrix in row major order
using Zivid::Matrix< T, rowCount, colCount >::ConstIterator = typename Storage::const_iterator |
The matrix iterator type for immutable access. It iterates over individual matrix elements in row major order.
using Zivid::Matrix< T, rowCount, colCount >::Iterator = typename Storage::iterator |
The matrix iterator type for mutable access. It iterates over individual matrix elements in row major order.
using Zivid::Matrix< T, rowCount, colCount >::ValueType = T |
The type stored in the matrix
|
default |
Constructor
|
inline |
Load the matrix from a file
|
inlineexplicit |
Constructor
|
inline |
Constructor
|
inlineexplicit |
Constructor
|
inlineexplicit |
Constructor
|
inline |
Access specified element with bounds checking
|
inline |
Access specified element with bounds checking
|
inline |
Iterator to the beginning of the matrix
|
inline |
Iterator to the beginning of the matrix
|
inline |
Iterator to the beginning of the matrix
|
inline |
Iterator to the end of the matrix
|
inline |
Pointer to the underlying data
|
inline |
Pointer to the underlying data
|
inline |
Iterator to the end of the matrix
|
inline |
Iterator to the end of the matrix
ZIVID_CORE_EXPORT Matrix Zivid::Matrix< T, rowCount, colCount >::inverse | ( | ) | const |
Get the inverse of this matrix
An exception is thrown if the matrix is not invertible.
void Zivid::Matrix< T, rowCount, colCount >::load | ( | const std::string & | fileName | ) |
Load the matrix from the given file
Loads the matrix into the object it was invoked on, does not return a value.
|
inline |
Access specified element without bounds checking
|
inline |
Access specified element without bounds checking
void Zivid::Matrix< T, rowCount, colCount >::save | ( | const std::string & | fileName | ) | const |
Save the matrix to the given file
The matrix is saved in YAML format.
|
inline |
|
staticconstexpr |
The number of columns in the matrix
|
staticconstexpr |
The number of rows in the matrix