|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Proxy of a column of a row that is not const. More...
Public Member Functions | |
| constexpr | Proxy (Packed_Row &r, const size_t col) noexcept |
Bind column col of r. | |
| constexpr | Proxy (const Proxy &) noexcept=default |
| Copying a proxy binds the same column of the same row. | |
| constexpr | operator std::int64_t () const noexcept |
| Read the column. | |
| constexpr const Proxy & | operator= (const std::int64_t v) const noexcept(not Checked) |
| Write the column. | |
| constexpr const Proxy & | operator= (const Proxy &p) const noexcept(not Checked) |
| Write the column with the value of another one. | |
| constexpr const Proxy & | operator+= (const std::int64_t v) const noexcept(not Checked) |
Add v to the column. | |
| constexpr const Proxy & | operator-= (const std::int64_t v) const noexcept(not Checked) |
Subtract v from the column. | |
| constexpr const Proxy & | operator++ () const noexcept(not Checked) |
| Add one to the column. | |
| constexpr const Proxy & | operator-- () const noexcept(not Checked) |
| Subtract one from the column. | |
Private Attributes | |
| Packed_Row & | row |
| The row. | |
| size_t | j |
The column; already validated if Checked. | |
Proxy of a column of a row that is not const.
| Checked | Whether writing validates the value. |
Definition at line 411 of file tpl_packed_matrix.H.
|
inlineconstexprnoexcept |
Bind column col of r.
| [in] | r | The row. |
| [in] | col | The column, less than num_cols. |
Definition at line 421 of file tpl_packed_matrix.H.
|
constexprdefaultnoexcept |
Copying a proxy binds the same column of the same row.
|
inlineconstexprnoexcept |
Read the column.
Definition at line 431 of file tpl_packed_matrix.H.
References Aleph::Packed_Row< Cols >::fast_read(), Aleph::Packed_Row< Cols >::Proxy< Checked >::j, and Aleph::Packed_Row< Cols >::Proxy< Checked >::row.
|
inlineconstexprnoexcept |
Add one to the column.
| std::domain_error | if Checked and the column is at its highest value; the row does not change. |
std::int64_t wraps around. Definition at line 495 of file tpl_packed_matrix.H.
|
inlineconstexprnoexcept |
Add v to the column.
| [in] | v | The addend. |
| std::domain_error | if Checked and the sum is outside the range of the column; the row does not change. |
std::int64_t it wraps around. Definition at line 469 of file tpl_packed_matrix.H.
References Aleph::Packed_Row< Cols >::fast_read(), Aleph::Packed_Row< Cols >::Proxy< Checked >::j, and Aleph::Packed_Row< Cols >::Proxy< Checked >::row.
|
inlineconstexprnoexcept |
Subtract one from the column.
| std::domain_error | if Checked and the column is at its lowest value; the row does not change. |
std::int64_t wraps around. Definition at line 506 of file tpl_packed_matrix.H.
|
inlineconstexprnoexcept |
Subtract v from the column.
| [in] | v | The subtrahend. |
| std::domain_error | if Checked and the difference is outside the range of the column; the row does not change. |
std::int64_t it wraps around. Definition at line 483 of file tpl_packed_matrix.H.
References Aleph::Packed_Row< Cols >::fast_read(), Aleph::Packed_Row< Cols >::Proxy< Checked >::j, and Aleph::Packed_Row< Cols >::Proxy< Checked >::row.
|
inlineconstexprnoexcept |
Write the column with the value of another one.
| [in] | p | Proxy of the column to read. |
| std::domain_error | if Checked and the value is outside the range of this column; the row does not change. |
Definition at line 456 of file tpl_packed_matrix.H.
|
inlineconstexprnoexcept |
Write the column.
| [in] | v | The value. |
| std::domain_error | if Checked and v is outside the range of the column; the row does not change. |
Definition at line 442 of file tpl_packed_matrix.H.
References Aleph::Packed_Row< Cols >::check_value(), Aleph::Packed_Row< Cols >::fast_write(), Aleph::Packed_Row< Cols >::Proxy< Checked >::j, and Aleph::Packed_Row< Cols >::Proxy< Checked >::row.
|
private |
The column; already validated if Checked.
Definition at line 414 of file tpl_packed_matrix.H.
Referenced by Aleph::Packed_Row< Cols >::Proxy< Checked >::operator std::int64_t(), Aleph::Packed_Row< Cols >::Proxy< Checked >::operator+=(), Aleph::Packed_Row< Cols >::Proxy< Checked >::operator-=(), and Aleph::Packed_Row< Cols >::Proxy< Checked >::operator=().
|
private |
The row.
Definition at line 413 of file tpl_packed_matrix.H.
Referenced by Aleph::Packed_Row< Cols >::Proxy< Checked >::operator std::int64_t(), Aleph::Packed_Row< Cols >::Proxy< Checked >::operator+=(), Aleph::Packed_Row< Cols >::Proxy< Checked >::operator-=(), and Aleph::Packed_Row< Cols >::Proxy< Checked >::operator=().