1#ifndef XPED_VECOFMAT_ITERATOR_HPP_
2#define XPED_VECOFMAT_ITERATOR_HPP_
4#include <boost/iterator/iterator_facade.hpp>
12template <
typename Element>
13class VecOfMatIterator :
public boost::iterator_facade<VecOfMatIterator<Element>, Element*, boost::forward_traversal_tag, Element>
22 , block_num(block_num)
31 if(block_num == data->size() - 1 and elem_num == data->at(block_num).size() - 1) {
32 block_num = data->size();
36 if(elem_num < data->at(block_num).size() - 1)
44 bool equal(VecOfMatIterator<Element>
const& other)
const {
return (this->block_num == other.block_num and this->elem_num == other.elem_num); }
48 std::vector<PlainInterface::MType<Element>>* data;
49 std::size_t block_num = 0;
50 std::size_t elem_num = 0;
55template <
typename Scalar>
Definition: VecOfMatIterator.hpp:14
VecOfMatIterator()
Definition: VecOfMatIterator.hpp:16
friend class boost::iterator_core_access
Definition: VecOfMatIterator.hpp:27
VecOfMatIterator(std::vector< PlainInterface::MType< Element > > *o_val, std::size_t block_num=0, std::size_t elem_num=0)
Definition: VecOfMatIterator.hpp:20
Definition: MatrixMultiplication.hpp:4
CTF::Matrix< Scalar > MType
Definition: MatrixInterface_Cyclops_impl.hpp:40
static const Scalar * get_raw_data(const Eigen::Matrix< Scalar, -1, -1 > &M)
Definition: MatrixInterface_Eigen_impl.hpp:81