12 #ifndef BOGUS_ITERABLE_BLOCK_OBJECT
13 #define BOGUS_ITERABLE_BLOCK_OBJECT
15 #include "BlockObjectBase.hpp"
16 #include "../Utils/CppTools.hpp"
21 template <
typename Derived >
26 typedef typename Traits::Index Index ;
27 typedef typename Traits::Scalar Scalar ;
37 template <
bool DoTranspose,
typename RhsT,
typename ResT >
38 void rowMultiply(
const Index row,
const RhsT& rhs, ResT& res )
const
40 rowMultiplyPrecompose< DoTranspose >( row, rhs, res, make_constant_array(1) ) ;
42 template <
bool DoTranspose,
typename RhsT,
typename ResT,
typename PreOp >
43 void rowMultiplyPrecompose(
const Index row,
const RhsT& rhs, ResT& res,
const PreOp &op )
const
45 derived().template rowMultiplyPrecompose< DoTranspose >( row, rhs, res, op ) ;
49 template <
bool DoTranspose,
typename RhsT,
typename ResT >
50 void colMultiply(
const Index col,
const RhsT& rhs, ResT& res )
const
52 colMultiplyPostcompose< DoTranspose >( col, rhs, res, make_constant_array(1) ) ;
54 template <
bool DoTranspose,
typename RhsT,
typename ResT,
typename PostOp >
55 void colMultiplyPostcompose(
const Index col,
const RhsT& rhs, ResT& res,
const PostOp &op )
const
57 derived().template colMultiplyPostcompose< DoTranspose >( col, rhs, res, op ) ;
61 template <
typename Func>
63 {
derived().template eachBlockOfRow<Func>(row, func) ; }
66 template <
typename Func>
68 {
derived().template eachBlockOfCol<Func>(col, func) ; }
void eachBlockOfRow(const Index row, Func func) const
Iterates over each block of a given row. Calls func( col, block )
Definition: IterableBlockObject.hpp:62
Definition: Traits.hpp:19
const Derived & derived() const
Returns a const reference to the implementation.
Definition: BlockObjectBase.hpp:25
Base class for matrix-like objects that define a block structure, but not a block type...
Definition: IterableBlockObject.hpp:22
void colMultiply(const Index col, const RhsT &rhs, ResT &res) const
Multiplication with a single column.
Definition: IterableBlockObject.hpp:50
void eachBlockOfCol(const Index col, Func func) const
Iterates over each block of a given col. Calls func( row, block )
Definition: IterableBlockObject.hpp:67
Base class for anything block.
Definition: BlockObjectBase.hpp:22
void rowMultiply(const Index row, const RhsT &rhs, ResT &res) const
Multiplication with a single row.
Definition: IterableBlockObject.hpp:38
Index size() const
Returns the total number of blocks of the matrix.
Definition: IterableBlockObject.hpp:33