A class for a scalar that can be written to the sparse matrix or sparse vector datatypes.
More...
#include <amg_base.hpp>
Detailed Description
template<typename InternalType, typename IteratorType, typename ScalarType>
class viennacl::linalg::detail::amg::amg_nonzero_scalar< InternalType, IteratorType, ScalarType >
A class for a scalar that can be written to the sparse matrix or sparse vector datatypes.
Values are only written to those datatypes if non-zero to optimize memory usage and performance. Needed for the []- and ()-operators.
Constructor & Destructor Documentation
amg_nonzero_scalar |
( |
InternalType * |
m, |
|
|
IteratorType & |
iter, |
|
|
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
ScalarType |
s = 0 | |
|
) |
| | [inline] |
The constructor.
- Parameters:
-
| m | Pointer to the sparse vector/matrix the scalar will be written to |
| iter | Iterator pointing to the respective element in the vector/matrix if available |
| i | Row index scalar will be written to |
| j | Col index scalar will be written to |
| s | Value of the scalar (usually used as dummy here as it will be set by the assignment operator) |
Member Function Documentation
operator ScalarType |
( |
void |
|
) |
[inline] |
ScalarType operator++ |
( |
|
) |
[inline] |
ScalarType operator++ |
( |
int |
|
) |
[inline] |
ScalarType operator+= |
( |
const ScalarType |
value |
) |
[inline] |
Addition operator. Adds a constant.
- Parameters:
-
| value | Value that will be written |
ScalarType operator= |
( |
const ScalarType |
value |
) |
[inline] |
Assignment operator. Writes value into matrix at the given position.
- Parameters:
-
| value | Value that will be written |
The documentation for this class was generated from the following file:
- /data/development/ViennaCL/dev/viennacl/linalg/detail/amg/amg_base.hpp