DynamicRowView¶
Defined in matrix.hpp
.
This is a class for views into a row of a matrix over a semirings. 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 usual vector operations are defined for row views.
There are two types of DynamicMatrix
and two types of
DynamicRowView
also:
those where the arithmetic is defined at compile time;
those where the arithmetic is defined at run time.
From the perspective of using these DynamicRowViews there is no
difference in the interface; the distinction is only important if you
want to extend the functionality of libsemigroups
to further
semirings.
Warning
If the underlying matrix is destroyed, then any row views for that matrix are invalidated.

template<
typename PlusOp,
typename ProdOp,
typename ZeroOp,
typename OneOp,
typename Scalar
>
class DynamicRowView final¶ This class is the type of row views into a
DynamicMatrix
with the same template parameters; see the documentation forDynamicMatrix
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)Scalar – the type of the entries in the matrices (the type of elements in the underlying semiring)

template<typename Semiring, typename Scalar>
class DynamicRowView final¶ This class is the type of row views into a
DynamicMatrix
with the same template parameters; see the documentation forDynamicMatrix
for further details.Warning
If the underlying matrix is destroyed, then any row views for that matrix are invalidated.
 Template Parameters
Semiring – the type of a semiring object which defines the semiring arithmetic (see requirements below).
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 