![]() |
Access proxy for lower unitriangular matrices.The UniLowerProxy provides controlled access to the elements of a non-const lower unitriangular matrix. It guarantees that the unilower matrix invariant is not violated, i.e. that elements in the upper part of the matrix remain 0 and the diagonal elements remain 1. The following example illustrates this by means of a dense lower unitriangular matrix:
More...
#include <UniLowerProxy.h>
Inherits blaze::Proxy< UniLowerProxy< MT > >.
Public Types | |
using | RepresentedType = ElementType_t< MT > |
Type of the represented matrix element. | |
using | ValueType = typename If_t< IsComplex_v< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type |
Value type of the represented complex element. | |
using | value_type = ValueType |
Value type of the represented complex element. | |
Public Member Functions | |
template<typename T > | |
const UniLowerProxy< MT > & | operator= (const T &value) const |
Assignment to the accessed matrix element. More... | |
template<typename T > | |
const UniLowerProxy< MT > & | operator+= (const T &value) const |
Addition assignment to the accessed matrix element. More... | |
template<typename T > | |
const UniLowerProxy< MT > & | operator-= (const T &value) const |
Subtraction assignment to the accessed matrix element. More... | |
template<typename T > | |
const UniLowerProxy< MT > & | operator*= (const T &value) const |
Multiplication assignment to the accessed matrix element. More... | |
template<typename T > | |
const UniLowerProxy< MT > & | operator/= (const T &value) const |
Division assignment to the accessed matrix element. More... | |
template<typename T > | |
const UniLowerProxy< MT > & | operator%= (const T &value) const |
Modulo assignment to the accessed matrix element. More... | |
Constructors | |
UniLowerProxy (MT &matrix, size_t row, size_t column) | |
Initialization constructor for an UniLowerProxy. More... | |
UniLowerProxy (const UniLowerProxy &ulp) | |
The copy constructor for LowerProxy. More... | |
Destructor | |
~UniLowerProxy ()=default | |
Assignment operators | |
const UniLowerProxy & | operator= (const UniLowerProxy &ulp) const |
Copy assignment operator for UniLowerProxy. More... | |
template<typename T > | |
const UniLowerProxy & | operator= (const T &value) const |
template<typename T > | |
const UniLowerProxy & | operator+= (const T &value) const |
template<typename T > | |
const UniLowerProxy & | operator-= (const T &value) const |
template<typename T > | |
const UniLowerProxy & | operator*= (const T &value) const |
template<typename T > | |
const UniLowerProxy & | operator/= (const T &value) const |
template<typename T > | |
const UniLowerProxy & | operator%= (const T &value) const |
Access operators | |
const UniLowerProxy * | operator-> () const noexcept |
Direct access to the accessed matrix element. More... | |
Utility functions | |
void | reset () const |
Reset the represented element to its default initial value. More... | |
void | clear () const |
Clearing the represented element. More... | |
void | invert () const |
In-place inversion of the represented element. More... | |
RepresentedType | get () const noexcept |
Returning the value of the accessed matrix element. More... | |
bool | isRestricted () const noexcept |
Returns whether the proxy represents a restricted matrix element.. More... | |
Conversion operator | |
operator RepresentedType () const noexcept | |
Conversion to the accessed matrix element. More... | |
Complex data access functions | |
ValueType | real () const |
Returns the real part of the represented complex number. More... | |
void | real (ValueType value) const |
Setting the real part of the represented complex number. More... | |
ValueType | imag () const |
Returns the imaginary part of the represented complex number. More... | |
void | imag (ValueType value) const |
Setting the imaginary part of the represented complex number. More... | |
Private Types | |
using | ReferenceType = typename MT::Reference |
Reference type of the underlying matrix type. | |
Private Attributes | |
Member variables | |
ReferenceType | value_ |
Reference to the accessed matrix element. | |
size_t | row_ |
Row index of the accessed matrix element. | |
size_t | column_ |
Column index of the accessed matrix element. | |
Access proxy for lower unitriangular matrices.
The UniLowerProxy provides controlled access to the elements of a non-const lower unitriangular matrix. It guarantees that the unilower matrix invariant is not violated, i.e. that elements in the upper part of the matrix remain 0 and the diagonal elements remain 1. The following example illustrates this by means of a dense lower unitriangular matrix:
|
inlineexplicit |
Initialization constructor for an UniLowerProxy.
matrix | Reference to the adapted matrix. |
row | The row-index of the accessed matrix element. |
column | The column-index of the accessed matrix element. |
|
inline |
The copy constructor for LowerProxy.
ulp | Proxy to be copied. |
|
inline |
Clearing the represented element.
This function clears the element represented by the proxy to its default initial state.
|
inlinenoexcept |
Returning the value of the accessed matrix element.
|
inline |
Returns the imaginary part of the represented complex number.
In case the proxy represents a complex number, this function returns the current value of its imaginary part.
|
inline |
Setting the imaginary part of the represented complex number.
value | The new value for the imaginary part. |
std::invalid_argument | Invalid setting for diagonal or upper matrix element. |
In case the proxy represents a complex number, this function sets a new value to its imaginary part. In case the represented value is a diagonal element or an element in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
In-place inversion of the represented element.
std::invalid_argument | Invalid inversion of upper matrix element. |
In case the proxy represents an upper element, a std::invalid_argument exception is thrown.
|
inlinenoexcept |
Returns whether the proxy represents a restricted matrix element..
|
inlinenoexcept |
Conversion to the accessed matrix element.
|
inline |
Modulo assignment to the accessed matrix element.
value | The right-hand side value for the modulo operation. |
std::invalid_argument | Invalid assignment to diagonal or upper matrix element. |
In case the proxy represents an element on the diagonal or in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
Multiplication assignment to the accessed matrix element.
value | The right-hand side value for the multiplication. |
std::invalid_argument | Invalid assignment to diagonal or upper matrix element. |
In case the proxy represents an element on the diagonal or in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
Addition assignment to the accessed matrix element.
value | The right-hand side value to be added to the matrix element. |
std::invalid_argument | Invalid assignment to diagonal or upper matrix element. |
In case the proxy represents an element on the diagonal or in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
Subtraction assignment to the accessed matrix element.
value | The right-hand side value to be subtracted from the matrix element. |
std::invalid_argument | Invalid assignment to diagonal or upper matrix element. |
In case the proxy represents an element on the diagonal or in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inlinenoexcept |
Direct access to the accessed matrix element.
|
inline |
Division assignment to the accessed matrix element.
value | The right-hand side value for the division. |
std::invalid_argument | Invalid assignment to diagonal or upper matrix element. |
In case the proxy represents an element on the diagonal or in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
Copy assignment operator for UniLowerProxy.
ulp | Proxy to be copied. |
std::invalid_argument | Invalid assignment to diagonal or upper matrix element. |
In case the proxy represents an element on the diagonal or in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
Assignment to the accessed matrix element.
value | The new value of the matrix element. |
std::invalid_argument | Invalid assignment to diagonal or upper matrix element. |
In case the proxy represents an element on the diagonal or in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
Returns the real part of the represented complex number.
In case the proxy represents a complex number, this function returns the current value of its real part.
|
inline |
Setting the real part of the represented complex number.
value | The new value for the real part. |
std::invalid_argument | Invalid setting for diagonal or upper matrix element. |
In case the proxy represents a complex number, this function sets a new value to its real part. In case the represented value is a diagonal element or an element in the upper part of the matrix, a std::invalid_argument exception is thrown.
|
inline |
Reset the represented element to its default initial value.
This function resets the element represented by the proxy to its default initial value.