Access proxy for upper unitriangular matrices.The UniUpperProxy provides controlled access to the elements of a non-const upper unitriangular matrix. It guarantees that the uniupper matrix invariant is not violated, i.e. that elements in the lower part of the matrix remain 0 and the diagonal elements remain 1. The following example illustrates this by means of a
dense upper unitriangular matrix:
More...
#include <UniUpperProxy.h>
Inherits blaze::Proxy< UniUpperProxy< MT > >.
|
typedef MT::Reference | ReferenceType |
| Reference type of the underlying matrix type.
|
|
template<typename MT>
class blaze::UniUpperProxy< MT >
Access proxy for upper unitriangular matrices.
The UniUpperProxy provides controlled access to the elements of a non-const upper unitriangular matrix. It guarantees that the uniupper matrix invariant is not violated, i.e. that elements in the lower part of the matrix remain 0 and the diagonal elements remain 1. The following example illustrates this by means of a
dense upper unitriangular matrix:
A(0,1) = -2;
A(0,2) = 3;
A(1,2) = 5;
A(1,1) = 4;
A(2,0) = 7;
Initialization constructor for a UniUpperProxy.
- Parameters
-
matrix | Reference to the adapted matrix. |
row | The row-index of the accessed matrix element. |
column | The column-index of the accessed matrix element. |
Clearing the represented element.
- Returns
- void
This function clears the element represented by the proxy to its default initial state.
Returning the value of the accessed matrix element.
- Returns
- Direct/raw reference to the accessed matrix element.
Returns the imaginary part of the represented complex number.
- Returns
- The current 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.
Setting the imaginary part of the represented complex number.
- Parameters
-
value | The new value for the imaginary part. |
- Returns
- void
- Exceptions
-
std::invalid_argument | Invalid setting for diagonal or lower 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 lower part of the matrix, a std::invalid_argument exception is thrown.
In-place inversion of the represented element.
- Returns
- void
- Exceptions
-
std::invalid_argument | Invalid inversion of upper matrix element. |
In case the proxy represents a lower element, a std::invalid_argument exception is thrown.
Returns whether the proxy represents a restricted matrix element..
- Returns
- true in case access to the matrix element is restricted, false if not.
Conversion to the accessed matrix element.
- Returns
- Direct/raw reference to the accessed matrix element.
template<typename MT>
template<typename T >
Multiplication assignment to the accessed matrix element.
- Parameters
-
value | The right-hand side value for the multiplication. |
- Returns
- Reference to the assigned proxy.
- Exceptions
-
std::invalid_argument | Invalid assignment to diagonal or lower matrix element. |
In case the proxy represents an element on the diagonal or in the lower part of the matrix, a std::invalid_argument exception is thrown.
template<typename MT>
template<typename T >
Addition assignment to the accessed matrix element.
- Parameters
-
value | The right-hand side value to be added to the matrix element. |
- Returns
- Reference to the assigned proxy.
- Exceptions
-
std::invalid_argument | Invalid assignment to diagonal or lower matrix element. |
In case the proxy represents an element on the diagonal or in the lower part of the matrix, a std::invalid_argument exception is thrown.
template<typename MT>
template<typename T >
Subtraction assignment to the accessed matrix element.
- Parameters
-
value | The right-hand side value to be subtracted from the matrix element. |
- Returns
- Reference to the assigned proxy.
- Exceptions
-
std::invalid_argument | Invalid assignment to diagonal or lower matrix element. |
In case the proxy represents an element on the diagonal or in the lower part of the matrix, a std::invalid_argument exception is thrown.
template<typename MT>
template<typename T >
Division assignment to the accessed matrix element.
- Parameters
-
value | The right-hand side value for the division. |
- Returns
- Reference to the assigned proxy.
- Exceptions
-
std::invalid_argument | Invalid assignment to diagonal or lower matrix element. |
In case the proxy represents an element on the diagonal or in the lower part of the matrix, a std::invalid_argument exception is thrown.
Copy assignment operator for UniUpperProxy.
- Parameters
-
- Returns
- Reference to the assigned proxy.
- Exceptions
-
std::invalid_argument | Invalid assignment to diagonal or lower matrix element. |
In case the proxy represents an element on the diagonal or in the lower part of the matrix, a std::invalid_argument exception is thrown.
template<typename MT>
template<typename T >
Assignment to the accessed matrix element.
- Parameters
-
value | The new value of the matrix element. |
- Returns
- Reference to the assigned proxy.
- Exceptions
-
std::invalid_argument | Invalid assignment to diagonal or lower matrix element. |
In case the proxy represents an element on the diagonal or in the lower part of the matrix, a std::invalid_argument exception is thrown.
Returns the real part of the represented complex number.
- Returns
- The current 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.
Setting the real part of the represented complex number.
- Parameters
-
value | The new value for the real part. |
- Returns
- void
- Exceptions
-
std::invalid_argument | Invalid setting for diagonal or lower 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 lower part of the matrix, a std::invalid_argument exception is thrown.
Reset the represented element to its default initial value.
- Returns
- void
This function resets the element represented by the proxy to its default initial value.
The documentation for this class was generated from the following file: