StaticRowView¶
Defined in matrix.hpp
.
-
template<
typename PlusOp,
typename ProdOp,
typename ZeroOp,
typename OneOp,
size_t C,
typename Scalar
>
class StaticRowView final¶ This is a class for views into a row of a matrix over a semiring. An instance of this class provides access to the elements in a row of a matrix and is cheap to create and copy. Addition, scalar multiplication, and other standard vector operations are defined for row views.
This class is the type of row views into a
StaticMatrix
; see the documentation forStaticMatrix
for further details.warning If the underlying matrix is destroyed, then any row views for that matrix are invalidated.
- Template Parameters
PlusOp – a stateless type with a call operator of signature
scalar_type operator()(scalar_type, scalar_type)
implementing the addition of the semiringProdOp – a stateless type with a call operator of signature
scalar_type operator()(scalar_type, scalar_type)
implementing the multiplication of the semiringZeroOp – a stateless type with a call operator of signature
scalar_type operator()()
returning the zero of the semiring (the additive identity element)OneOp – a stateless type with a call operator of signature
scalar_type operator()()
returning the one of the semiring (the multiplicative identity element)C – the number of columns of the underlying matrix
Scalar – the type of the entries in the matrices (the type of elements in the underlying semiring)
Member types¶
Member type |
Definition |
---|---|
the type of scalars contained in the row ( |
|
the type of references to scalars contained in the row |
|
the type of const references to scalars contained in the row |
|
type of the underlying matrix of the row view |
|
type of a row for the row view |
|
type of iterators to entries in the underlying row |
|
type of iterators to entries in the underlying row |
Member functions¶
constructs the matrix |
|
the length of the row (the template parameter |
Iterators¶
returns an iterator to the beginning |
|
returns an iterator to the end |
Accessors¶
access specified element |
|
access specified element |
Arithmetic operators¶
add a (matrix, scalar, or row view) to the matrix in place |
|
multiply the matrix by a matrix or scalar in place |
|
add a (matrix, scalar, or row view) to the matrix |
|
multiply the matrix by a matrix or scalar |
Comparison operators¶
compare matrices |
|
compare matrices |
|
compare matrices |
|
compare matrices |