Weighted Matrix.
More...
#include <yat/utility/MatrixWeighted.h>
Weighted Matrix.
- Since
- New in yat 0.5
◆ column_iterator
Mutable iterator that iterates over one column
◆ const_column_iterator
Read-only iterator that iterates over one column
◆ const_iterator
Read-only iterator that iterates over all elements
◆ const_reference
◆ const_row_iterator
Read-only iterator that iterates over one row
◆ iterator
Mutable iterator that iterates over all elements
◆ reference
◆ row_iterator
Mutable iterator that iterates over one row
◆ value_type
◆ MatrixWeighted() [1/5]
theplu::yat::utility::MatrixWeighted::MatrixWeighted |
( |
void |
| ) |
|
◆ MatrixWeighted() [2/5]
theplu::yat::utility::MatrixWeighted::MatrixWeighted |
( |
size_t |
r, |
|
|
size_t |
c, |
|
|
double |
init_value = 0 , |
|
|
double |
init_weight = 1.0 |
|
) |
| |
Create a r times c MatrixWeighted.
If r is zero c must be zero and vice versa.
Constructor allocating memory space for r times c elements, and sets all elements to DataWeight(init_value, init_weight)
◆ MatrixWeighted() [3/5]
theplu::yat::utility::MatrixWeighted::MatrixWeighted |
( |
MatrixWeighted && |
| ) |
|
The move copy constructor.
- Since
- new in yat 0.15
◆ MatrixWeighted() [4/5]
theplu::yat::utility::MatrixWeighted::MatrixWeighted |
( |
const MatrixBase & |
other | ) |
|
|
explicit |
Constructor.
Data is copied from other and weights are calculated using the binary_weight function, i.e., a NaN gets a zero weight (0.0) and other data values results in a unity weight (1.0).
◆ MatrixWeighted() [5/5]
theplu::yat::utility::MatrixWeighted::MatrixWeighted |
( |
std::istream & |
, |
|
|
char |
sep = '\0' |
|
) |
| |
|
explicit |
◆ begin() [1/2]
iterator theplu::yat::utility::MatrixWeighted::begin |
( |
void |
| ) |
|
Iterator iterates along a row. When end of row is reached it jumps to beginning of next row.
- Returns
- iterator pointing to upper-left element.
◆ begin() [2/2]
const_iterator theplu::yat::utility::MatrixWeighted::begin |
( |
void |
| ) |
const |
Iterator iterates along a row. When end of row is reached it jumps to beginning of next row.
- Returns
- const_iterator pointing to upper-left element.
◆ begin_column() [1/2]
column_iterator theplu::yat::utility::MatrixWeighted::begin_column |
( |
size_t |
i | ) |
|
Iterator iterates along a column.
- Returns
- iterator pointing to first element of column i.
◆ begin_column() [2/2]
Iterator iterates along a column.
- Returns
- const_iterator pointing to first element of column i.
◆ begin_row() [1/2]
row_iterator theplu::yat::utility::MatrixWeighted::begin_row |
( |
size_t |
i | ) |
|
Iterator iterates along a row.
- Returns
- iterator pointing to first element of row i.
◆ begin_row() [2/2]
Iterator iterates along a row.
- Returns
- const_iterator pointing to first element of row i.
◆ columns()
size_t theplu::yat::utility::MatrixWeighted::columns |
( |
void |
| ) |
const |
- Returns
- The number of columns in the matrix.
◆ end() [1/2]
iterator theplu::yat::utility::MatrixWeighted::end |
( |
void |
| ) |
|
- Returns
- iterator pointing to end of matrix
◆ end() [2/2]
const_iterator theplu::yat::utility::MatrixWeighted::end |
( |
void |
| ) |
const |
- Returns
- const_iterator pointing to end of matrix
◆ end_column() [1/2]
column_iterator theplu::yat::utility::MatrixWeighted::end_column |
( |
size_t |
i | ) |
|
- Returns
- iterator pointing to end of column i
◆ end_column() [2/2]
- Returns
- const_iterator pointing to end of column i
◆ end_row() [1/2]
row_iterator theplu::yat::utility::MatrixWeighted::end_row |
( |
size_t |
i | ) |
|
- Returns
- iterator pointing to end of row i
◆ end_row() [2/2]
- Returns
- const_iterator pointing to end of row i
◆ operator()() [1/2]
DataWeight& theplu::yat::utility::MatrixWeighted::operator() |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| |
Element access operator.
- Returns
- Reference to the element position (row, column).
◆ operator()() [2/2]
const DataWeight& theplu::yat::utility::MatrixWeighted::operator() |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| const |
Element access operator.
- Returns
- Const reference to the element position (row, column).
◆ operator=()
The move assignment operator.
- Returns
- A reference to the resulting Matrix.
- Since
- new in yat 0.15
◆ resize()
void theplu::yat::utility::MatrixWeighted::resize |
( |
size_t |
rows, |
|
|
size_t |
columns |
|
) |
| |
Resize MatrixWeighted.
Elements in MatrixWeighted are undefined after a resize.
If rows is zero columns must be zero and vice versa.
- Note
- this function may invalidate iterators.
◆ rows()
size_t theplu::yat::utility::MatrixWeighted::rows |
( |
void |
| ) |
const |
- Returns
- The number of rows in the matrix.
◆ swap()
void theplu::yat::utility::MatrixWeighted::swap |
( |
MatrixWeighted & |
other | ) |
|
swap objects
Takes constant time. Invalidates iterators. There is no requirement on the size of other.
◆ swap()
The documentation for this class was generated from the following file: