Thrill
0.1
|
A simple m x n dense matrix for generating statistics.
Definition at line 29 of file matrix.hpp.
#include <matrix.hpp>
Public Member Functions | |
Matrix ()=default | |
empty matrix constructor More... | |
Matrix (size_t rows, size_t columns, const Type &initial=Type()) | |
constructor of m times n matrix. More... | |
Matrix (size_t rows_columns, const Type &initial=Type()) | |
constructor of square n times n matrix. More... | |
Matrix (size_t rows, size_t columns, std::vector< Type > &&data) | |
constructor of m times n matrix from appropriate vector More... | |
const Type & | at (size_t row, size_t column) const |
return const reference to element at cell More... | |
Type & | at (size_t row, size_t column) |
return reference to element at cell More... | |
size_t | columns () const |
number of columns in matrix More... | |
Type * | data () const |
raw data of matrix More... | |
bool | operator!= (const Matrix &b) const noexcept |
inequality operator More... | |
const Type & | operator() (size_t row, size_t column) const |
return const reference to element at cell More... | |
Type & | operator() (size_t row, size_t column) |
return reference to element at cell More... | |
Matrix & | operator*= (const Type &s) |
multiply matrix with a scalar More... | |
Matrix | operator+ (const Matrix &b) const |
add matrix to this one, returning result as a new matrix More... | |
Matrix & | operator+= (const Matrix &b) |
add matrix to this one More... | |
bool | operator== (const Matrix &b) const noexcept |
equality operator More... | |
size_t | rows () const |
number of rows in matrix More... | |
size_t | size () const |
size of matrix raw data (rows * columns) More... | |
template<typename Archive > | |
void | ThrillSerialize (Archive &ar) const |
serialization with Thrill's serializer More... | |
Static Public Member Functions | |
template<typename Archive > | |
static Matrix | ThrillDeserialize (Archive &ar) |
deserialization with Thrill's serializer More... | |
Static Public Attributes | |
static constexpr size_t | thrill_fixed_size = 0 |
static constexpr bool | thrill_is_fixed_size = false |
Private Attributes | |
size_t | columns_ = 0 |
number of columns in matrix More... | |
std::vector< Type > | data_ |
data of matrix. More... | |
size_t | rows_ = 0 |
number of rows in matrix More... | |
|
default |
empty matrix constructor
Referenced by Matrix< Type >::ThrillDeserialize().
|
inline |
constructor of m times n matrix.
Definition at line 36 of file matrix.hpp.
|
inlineexplicit |
constructor of square n times n matrix.
Definition at line 41 of file matrix.hpp.
|
inline |
constructor of m times n matrix from appropriate vector
Definition at line 45 of file matrix.hpp.
References Matrix< Type >::columns_, Matrix< Type >::data_, and Matrix< Type >::rows_.
|
inline |
return const reference to element at cell
Definition at line 64 of file matrix.hpp.
References Matrix< Type >::columns_, Matrix< Type >::data_, and Matrix< Type >::rows_.
Referenced by Matrix< Type >::operator()().
|
inline |
return reference to element at cell
Definition at line 71 of file matrix.hpp.
References Matrix< Type >::columns_, Matrix< Type >::data_, and Matrix< Type >::rows_.
|
inline |
number of columns in matrix
Definition at line 55 of file matrix.hpp.
References Matrix< Type >::columns_.
Referenced by Matrix< Type >::operator+(), Matrix< Type >::operator+=(), Matrix< Type >::operator==(), and Matrix< Type >::ThrillDeserialize().
|
inline |
raw data of matrix
Definition at line 58 of file matrix.hpp.
References Matrix< Type >::data_.
Referenced by Matrix< Type >::ThrillDeserialize().
|
inlinenoexcept |
inequality operator
Definition at line 115 of file matrix.hpp.
References Matrix< Type >::operator==().
|
inline |
return const reference to element at cell
Definition at line 78 of file matrix.hpp.
References Matrix< Type >::at().
|
inline |
return reference to element at cell
Definition at line 83 of file matrix.hpp.
References Matrix< Type >::at().
|
inline |
multiply matrix with a scalar
Definition at line 103 of file matrix.hpp.
References Matrix< Type >::data_.
add matrix to this one, returning result as a new matrix
Definition at line 96 of file matrix.hpp.
References Matrix< Type >::columns(), and Matrix< Type >::rows().
add matrix to this one
Definition at line 88 of file matrix.hpp.
References Matrix< Type >::columns(), Matrix< Type >::data_, and Matrix< Type >::rows().
|
inlinenoexcept |
equality operator
Definition at line 109 of file matrix.hpp.
References Matrix< Type >::columns(), Matrix< Type >::data_, and Matrix< Type >::rows().
Referenced by Matrix< Type >::operator!=().
|
inline |
number of rows in matrix
Definition at line 52 of file matrix.hpp.
References Matrix< Type >::rows_.
Referenced by Matrix< Type >::operator+(), Matrix< Type >::operator+=(), and Matrix< Type >::operator==().
|
inline |
size of matrix raw data (rows * columns)
Definition at line 61 of file matrix.hpp.
References Matrix< Type >::data_.
|
inlinestatic |
deserialization with Thrill's serializer
Definition at line 137 of file matrix.hpp.
References Matrix< Type >::columns(), Matrix< Type >::data(), and Matrix< Type >::Matrix().
|
inline |
serialization with Thrill's serializer
Definition at line 126 of file matrix.hpp.
References Matrix< Type >::columns_, Matrix< Type >::data_, and Matrix< Type >::rows_.
|
private |
number of columns in matrix
Definition at line 154 of file matrix.hpp.
Referenced by Matrix< Type >::at(), Matrix< Type >::columns(), Matrix< Type >::Matrix(), and Matrix< Type >::ThrillSerialize().
|
private |
data of matrix.
Definition at line 157 of file matrix.hpp.
Referenced by Matrix< Type >::at(), Matrix< Type >::data(), Matrix< Type >::Matrix(), Matrix< Type >::operator*=(), Matrix< Type >::operator+=(), Matrix< Type >::operator==(), Matrix< Type >::size(), and Matrix< Type >::ThrillSerialize().
|
private |
number of rows in matrix
Definition at line 152 of file matrix.hpp.
Referenced by Matrix< Type >::at(), Matrix< Type >::Matrix(), Matrix< Type >::rows(), and Matrix< Type >::ThrillSerialize().
|
static |
Definition at line 122 of file matrix.hpp.
|
static |
Definition at line 121 of file matrix.hpp.