openGPMP
Open Source Mathematics Package
|
Matrix and Scalar operations. More...
#include <mtx_tmpl.hpp>
Public Member Functions | |
Matrix (size_t mtx_rows, size_t mtx_cols) | |
Matrix Class constructor initializing empty vector. More... | |
Matrix () | |
Type & | operator() (size_t row, size_t col) |
Overload operator. More... | |
Matrix | mult (Matrix &target) |
Matrix Multiplication. More... | |
Matrix | scalar_mult (Type scalar) |
Matrix | hadamard (Matrix &target) |
Matrix | sqr_err () |
Matrix | add (Matrix &target) |
Matrix | operator+ (Matrix &target) |
Matrix | scalar_add (Type scalar) |
Matrix | operator- () |
Matrix | sub (Matrix &target) |
Matrix | operator- (Matrix &target) |
Matrix< unsigned short > | operator== (Matrix &target) |
bool | all () |
Matrix | transpose () |
Matrix | T () |
Matrix | sum () |
Matrix | sum (size_t dimension) |
Matrix | mean () |
Matrix | mean (size_t dimension) |
Matrix | concatenate (Matrix target, size_t dimension) |
Matrix | diag () |
Matrix | apply_func (const std::function< Type(const Type &)> &function) |
void | print_shape () |
void | print_mtx () |
void | fill_index (Type val) |
Public Attributes | |
size_t | cols |
size_t | rows |
std::vector< Type > | data |
std::tuple< size_t, size_t > | dim |
int64_t | num_elements = rows * cols |
Matrix and Scalar operations.
Definition at line 61 of file mtx_tmpl.hpp.
|
inline |
Matrix Class constructor initializing empty vector.
[in] | rows | : size of rows |
[in] | cols | : size of columns |
Definition at line 77 of file mtx_tmpl.hpp.
|
inline |
|
inline |
Definition at line 165 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, gpmp::linalg::Matrix< Type >::dim, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
Referenced by gpmp::linalg::Matrix< Type >::operator+(), and gpmp::linalg::Matrix< Type >::sub().
|
inline |
Definition at line 235 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, gpmp::linalg::Matrix< Type >::num_elements, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 368 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 320 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 351 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 394 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 139 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::dim, and python.linalg::res.
Referenced by gpmp::linalg::Matrix< Type >::sqr_err().
|
inline |
Definition at line 304 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::num_elements, gpmp::linalg::Matrix< Type >::scalar_mult(), and gpmp::linalg::Matrix< Type >::sum().
|
inline |
Definition at line 312 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, gpmp::linalg::Matrix< Type >::rows, gpmp::linalg::Matrix< Type >::scalar_mult(), and gpmp::linalg::Matrix< Type >::sum().
|
inline |
Matrix Multiplication.
[in] |
Definition at line 107 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Overload operator.
[in] | row | : size of rows |
[in] | col | : size of columns |
Definition at line 93 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, gpmp::linalg::Matrix< Type >::data, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
|
inline |
Definition at line 194 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
|
inline |
Definition at line 216 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, gpmp::linalg::Matrix< Type >::dim, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 384 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 379 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 183 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 124 of file mtx_tmpl.hpp.
References python.linalg::res.
Referenced by gpmp::linalg::Matrix< Type >::mean().
|
inline |
Definition at line 155 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::hadamard(), and python.linalg::res.
|
inline |
Definition at line 208 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::add().
Referenced by gpmp::linalg::Matrix< Type >::operator-().
|
inline |
Definition at line 269 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
Referenced by gpmp::linalg::Matrix< Type >::mean().
|
inline |
Definition at line 283 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, python.linalg::res, and gpmp::linalg::Matrix< Type >::rows.
|
inline |
Definition at line 262 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::transpose().
|
inline |
Definition at line 250 of file mtx_tmpl.hpp.
References gpmp::linalg::Matrix< Type >::cols, and gpmp::linalg::Matrix< Type >::rows.
Referenced by gpmp::linalg::Matrix< Type >::T().
size_t gpmp::linalg::Matrix< Type >::cols |
Definition at line 63 of file mtx_tmpl.hpp.
Referenced by gpmp::linalg::Matrix< Type >::add(), gpmp::linalg::Matrix< Type >::all(), gpmp::linalg::Matrix< Type >::apply_func(), gpmp::linalg::Matrix< Type >::concatenate(), gpmp::linalg::Matrix< Type >::diag(), gpmp::linalg::Matrix< Type >::fill_index(), gpmp::linalg::Matrix< Type >::mean(), gpmp::linalg::Matrix< Type >::mult(), gpmp::linalg::Matrix< Type >::operator()(), gpmp::linalg::Matrix< Type >::operator-(), gpmp::linalg::Matrix< Type >::operator==(), gpmp::linalg::Matrix< Type >::print_mtx(), gpmp::linalg::Matrix< Type >::print_shape(), gpmp::linalg::Matrix< Type >::scalar_add(), gpmp::linalg::Matrix< Type >::sum(), and gpmp::linalg::Matrix< Type >::transpose().
std::vector<Type> gpmp::linalg::Matrix< Type >::data |
Definition at line 66 of file mtx_tmpl.hpp.
Referenced by gpmp::linalg::Matrix< Type >::operator()().
std::tuple<size_t, size_t> gpmp::linalg::Matrix< Type >::dim |
Definition at line 67 of file mtx_tmpl.hpp.
Referenced by gpmp::linalg::Matrix< Type >::add(), gpmp::linalg::Matrix< Type >::hadamard(), and gpmp::linalg::Matrix< Type >::operator==().
int64_t gpmp::linalg::Matrix< Type >::num_elements = rows * cols |
Definition at line 69 of file mtx_tmpl.hpp.
Referenced by gpmp::linalg::Matrix< Type >::all(), and gpmp::linalg::Matrix< Type >::mean().
size_t gpmp::linalg::Matrix< Type >::rows |
Definition at line 64 of file mtx_tmpl.hpp.
Referenced by gpmp::linalg::Matrix< Type >::add(), gpmp::linalg::Matrix< Type >::all(), gpmp::linalg::Matrix< Type >::apply_func(), gpmp::linalg::Matrix< Type >::concatenate(), gpmp::linalg::Matrix< Type >::diag(), gpmp::linalg::Matrix< Type >::fill_index(), gpmp::linalg::Matrix< Type >::mean(), gpmp::linalg::Matrix< Type >::mult(), gpmp::linalg::Matrix< Type >::operator()(), gpmp::linalg::Matrix< Type >::operator-(), gpmp::linalg::Matrix< Type >::operator==(), gpmp::linalg::Matrix< Type >::print_mtx(), gpmp::linalg::Matrix< Type >::print_shape(), gpmp::linalg::Matrix< Type >::scalar_add(), gpmp::linalg::Matrix< Type >::sum(), and gpmp::linalg::Matrix< Type >::transpose().