74 #ifndef SLIP_GENERICMULTICOMPONENT4D_HPP
75 #define SLIP_GENERICMULTICOMPONENT4D_HPP
96 #include <boost/serialization/access.hpp>
97 #include <boost/serialization/split_member.hpp>
98 #include <boost/serialization/version.hpp>
103 template<
class Block>
104 class stride_iterator;
111 template <
class Block>
114 template <
class Block>
117 template <
class Block>
120 template <
typename Block>
123 template <
typename Block>
126 template <
class MultiComponentContainer4D, std::
size_t N>
129 template <
class MultiComponentContainer4d, std::
size_t N>
132 template <
typename Block>
133 std::ostream& operator<<(std::ostream & out, const GenericMultiComponent4d<Block>& a);
135 template<
typename Block>
139 template<
typename Block>
189 template <
typename Block>
326 static const std::size_t
DIM = 4;
375 typename Block::const_pointer val);
403 template<
typename InputIterator>
428 template<
typename InputIterator>
432 std::vector<InputIterator> first_iterators_list,
437 this->
fill(first_iterators_list,last);
467 const Block& val = Block());
5007 friend std::ostream& operator<< <>(std::ostream & out,
const self& a);
5036 self&
operator=(
const typename Block::value_type& val);
5045 std::fill_n(this->
begin(),
size(),value);
5054 void fill(
const typename Block::pointer value)
5078 template<
typename InputIterator>
5093 template<
typename InputIterator>
5094 void fill(std::vector<InputIterator> first_iterators_list,
5097 std::vector<typename slip::kstride_iterator<typename Block::pointer,Block::SIZE> >
5098 iterators_list(Block::SIZE);
5100 for(std::size_t component = 0; component < Block::SIZE; ++component)
5103 ((
typename Block::pointer)this->
begin() + component);
5107 while(first_iterators_list[0] != last)
5109 for(std::size_t component = 0; component < Block::SIZE; ++component)
5111 *iterators_list[component]++ = *first_iterators_list[component]++;
5114 iterators_list.clear();
5127 template<
typename InputIterator>
5129 InputIterator first,
5394 friend class boost::serialization::access;
5395 template<
class Archive>
5396 void save(Archive & ar,
const unsigned int version)
const
5400 template<
class Archive>
5401 void load(Archive & ar,
const unsigned int version)
5405 BOOST_SERIALIZATION_SPLIT_MEMBER();
5415 template<
typename Block>
5420 template<
typename Block>
5425 matrix_(new
Matrix4d<Block>(slabs,slices,rows,cols)){}
5427 template<
typename Block>
5432 matrix_(new
Matrix4d<Block>(slabs,slices,rows,cols,val)){}
5434 template<
typename Block>
5439 matrix_(new
Matrix4d<Block>(slabs,slices,rows,cols)){
5445 component < Block::SIZE; ++component)
5447 (*it)[component] = *val++;
5452 template<
typename Block>
5457 matrix_(new
Matrix4d<Block>(slabs,slices,rows,cols,val)){}
5459 template<
typename Block>
5462 matrix_(new
Matrix4d<Block>(*rhs.matrix_)){}
5464 template<
typename Block>
5470 template<
typename Block>
5477 matrix_->resize(slabs,slices,rows,cols,val);
5488 template<
typename Block>
5492 return matrix_->begin();
5495 template<
typename Block>
5503 template<
typename Block>
5507 return matrix_->end();
5510 template<
typename Block>
5518 template<
typename Block>
5525 template<
typename Block>
5532 template<
typename Block>
5539 template<
typename Block>
5548 template<
typename Block>
5554 return matrix_->slab_begin(slice,row,col);
5557 template<
typename Block>
5559 typename GenericMultiComponent4d<Block>::const_slab_iterator
5561 const GenericMultiComponent4d<Block>::size_type row,
5562 const GenericMultiComponent4d<Block>::size_type col)
const{
5563 Matrix4d<Block>
const * tp(matrix_);
5564 return tp->slab_begin(slice,row,col);
5567 template<
typename Block>
5569 typename GenericMultiComponent4d<Block>::slab_iterator
5571 const GenericMultiComponent4d<Block>::size_type row,
5572 const GenericMultiComponent4d<Block>::size_type col){
5573 return matrix_->slab_end(slice,row,col);
5576 template<
typename Block>
5578 typename GenericMultiComponent4d<Block>::const_slab_iterator
5580 const GenericMultiComponent4d<Block>::size_type row,
5581 const GenericMultiComponent4d<Block>::size_type col)
const{
5582 Matrix4d<Block>
const * tp(matrix_);
5583 return tp->slab_end(slice,row,col);
5586 template<
typename Block>
5588 typename GenericMultiComponent4d<Block>::reverse_slab_iterator
5590 const GenericMultiComponent4d<Block>::size_type row,
5591 const GenericMultiComponent4d<Block>::size_type col){
5592 return matrix_->slab_rbegin(slice,row,col);
5595 template<
typename Block>
5597 typename GenericMultiComponent4d<Block>::const_reverse_slab_iterator
5599 const GenericMultiComponent4d<Block>::size_type row,
5600 const GenericMultiComponent4d<Block>::size_type col)
const{
5601 Matrix4d<Block>
const * tp(matrix_);
5602 return tp->slab_rbegin(slice,row,col);
5605 template<
typename Block>
5607 typename GenericMultiComponent4d<Block>::reverse_slab_iterator
5609 const GenericMultiComponent4d<Block>::size_type row,
5610 const GenericMultiComponent4d<Block>::size_type col){
5611 return matrix_->slab_rend(slice,row,col);
5614 template<
typename Block>
5616 typename GenericMultiComponent4d<Block>::const_reverse_slab_iterator
5618 const GenericMultiComponent4d<Block>::size_type row,
5619 const GenericMultiComponent4d<Block>::size_type col)
const{
5620 Matrix4d<Block>
const * tp(matrix_);
5621 return tp->slab_rend(slice,row,col);
5626 template<
typename Block>
5628 typename GenericMultiComponent4d<Block>::slice_iterator
5630 const GenericMultiComponent4d<Block>::size_type row,
5631 const GenericMultiComponent4d<Block>::size_type col){
5632 return matrix_->slice_begin(slab,row,col);
5635 template<
typename Block>
5637 typename GenericMultiComponent4d<Block>::const_slice_iterator
5639 const GenericMultiComponent4d<Block>::size_type row,
5640 const GenericMultiComponent4d<Block>::size_type col)
const{
5641 Matrix4d<Block>
const * tp(matrix_);
5642 return tp->slice_begin(slab,row,col);
5645 template<
typename Block>
5647 typename GenericMultiComponent4d<Block>::slice_iterator
5649 const GenericMultiComponent4d<Block>::size_type row,
5650 const GenericMultiComponent4d<Block>::size_type col){
5651 return matrix_->slice_end(slab,row,col);
5654 template<
typename Block>
5656 typename GenericMultiComponent4d<Block>::const_slice_iterator
5658 const GenericMultiComponent4d<Block>::size_type row,
5659 const GenericMultiComponent4d<Block>::size_type col)
const{
5660 Matrix4d<Block>
const * tp(matrix_);
5661 return tp->slice_end(slab,row,col);
5664 template<
typename Block>
5666 typename GenericMultiComponent4d<Block>::reverse_slice_iterator
5668 const GenericMultiComponent4d<Block>::size_type row,
5669 const GenericMultiComponent4d<Block>::size_type col){
5670 return matrix_->slice_rbegin(slab,row,col);
5673 template<
typename Block>
5675 typename GenericMultiComponent4d<Block>::const_reverse_slice_iterator
5677 const GenericMultiComponent4d<Block>::size_type row,
5678 const GenericMultiComponent4d<Block>::size_type col)
const{
5679 Matrix4d<Block>
const * tp(matrix_);
5680 return tp->slice_rbegin(slab,row,col);
5683 template<
typename Block>
5685 typename GenericMultiComponent4d<Block>::reverse_slice_iterator
5687 const GenericMultiComponent4d<Block>::size_type row,
5688 const GenericMultiComponent4d<Block>::size_type col){
5689 return matrix_->slice_rend(slab,row,col);
5692 template<
typename Block>
5694 typename GenericMultiComponent4d<Block>::const_reverse_slice_iterator
5696 const GenericMultiComponent4d<Block>::size_type row,
5697 const GenericMultiComponent4d<Block>::size_type col)
const{
5698 Matrix4d<Block>
const * tp(matrix_);
5699 return tp->slice_rend(slab,row,col);
5704 template<
typename Block>
5706 typename GenericMultiComponent4d<Block>::row_iterator
5708 const GenericMultiComponent4d<Block>::size_type slice,
5709 const GenericMultiComponent4d<Block>::size_type row){
5710 return matrix_->row_begin(slab,slice,row);
5713 template<
typename Block>
5715 typename GenericMultiComponent4d<Block>::const_row_iterator
5717 const GenericMultiComponent4d<Block>::size_type slice,
5718 const GenericMultiComponent4d<Block>::size_type row)
const{
5719 Matrix4d<Block>
const * tp(matrix_);
5720 return tp->row_begin(slab,slice,row);
5723 template<
typename Block>
5725 typename GenericMultiComponent4d<Block>::row_iterator
5727 const GenericMultiComponent4d<Block>::size_type slice,
5728 const GenericMultiComponent4d<Block>::size_type row){
5729 return matrix_->row_end(slab,slice,row);
5732 template<
typename Block>
5734 typename GenericMultiComponent4d<Block>::const_row_iterator
5736 const GenericMultiComponent4d<Block>::size_type slice,
5737 const GenericMultiComponent4d<Block>::size_type row)
const{
5738 Matrix4d<Block>
const * tp(matrix_);
5739 return tp->row_end(slab,slice,row);
5742 template<
typename Block>
5744 typename GenericMultiComponent4d<Block>::reverse_row_iterator
5746 const GenericMultiComponent4d<Block>::size_type slice,
5747 const GenericMultiComponent4d<Block>::size_type row){
5748 return matrix_->row_rbegin(slab,slice,row);
5751 template<
typename Block>
5753 typename GenericMultiComponent4d<Block>::const_reverse_row_iterator
5755 const GenericMultiComponent4d<Block>::size_type slice,
5756 const GenericMultiComponent4d<Block>::size_type row)
const{
5757 Matrix4d<Block>
const * tp(matrix_);
5758 return tp->row_rbegin(slab,slice,row);
5761 template<
typename Block>
5763 typename GenericMultiComponent4d<Block>::reverse_row_iterator
5765 const GenericMultiComponent4d<Block>::size_type slice,
5766 const GenericMultiComponent4d<Block>::size_type row){
5767 return matrix_->row_rend(slab,slice,row);
5770 template<
typename Block>
5772 typename GenericMultiComponent4d<Block>::const_reverse_row_iterator
5774 const GenericMultiComponent4d<Block>::size_type slice,
5775 const GenericMultiComponent4d<Block>::size_type row)
const{
5776 Matrix4d<Block>
const * tp(matrix_);
5777 return tp->row_rend(slab,slice,row);
5782 template<
typename Block>
5784 typename GenericMultiComponent4d<Block>::col_iterator
5786 const GenericMultiComponent4d<Block>::size_type slice,
5787 const GenericMultiComponent4d<Block>::size_type col){
5788 return matrix_->col_begin(slab,slice,col);
5791 template<
typename Block>
5793 typename GenericMultiComponent4d<Block>::const_col_iterator
5795 const GenericMultiComponent4d<Block>::size_type slice,
5796 const GenericMultiComponent4d<Block>::size_type col)
const{
5797 Matrix4d<Block>
const * tp(matrix_);
5798 return tp->col_begin(slab,slice,col);
5801 template<
typename Block>
5803 typename GenericMultiComponent4d<Block>::col_iterator
5805 const GenericMultiComponent4d<Block>::size_type slice,
5806 const GenericMultiComponent4d<Block>::size_type col){
5807 return matrix_->col_end(slab,slice,col);
5810 template<
typename Block>
5812 typename GenericMultiComponent4d<Block>::const_col_iterator
5814 const GenericMultiComponent4d<Block>::size_type slice,
5815 const GenericMultiComponent4d<Block>::size_type col)
const{
5816 Matrix4d<Block>
const * tp(matrix_);
5817 return tp->col_end(slab,slice,col);
5820 template<
typename Block>
5822 typename GenericMultiComponent4d<Block>::reverse_col_iterator
5824 const GenericMultiComponent4d<Block>::size_type slice,
5825 const GenericMultiComponent4d<Block>::size_type col){
5826 return matrix_->col_rbegin(slab,slice,col);
5829 template<
typename Block>
5831 typename GenericMultiComponent4d<Block>::const_reverse_col_iterator
5833 const GenericMultiComponent4d<Block>::size_type slice,
5834 const GenericMultiComponent4d<Block>::size_type col)
const{
5835 Matrix4d<Block>
const * tp(matrix_);
5836 return tp->col_rbegin(slab,slice,col);
5839 template<
typename Block>
5841 typename GenericMultiComponent4d<Block>::reverse_col_iterator
5843 const GenericMultiComponent4d<Block>::size_type slice,
5844 const GenericMultiComponent4d<Block>::size_type col){
5845 return matrix_->col_rend(slab,slice,col);
5848 template<
typename Block>
5850 typename GenericMultiComponent4d<Block>::const_reverse_col_iterator
5852 const GenericMultiComponent4d<Block>::size_type slice,
5853 const GenericMultiComponent4d<Block>::size_type col)
const{
5854 Matrix4d<Block>
const * tp(matrix_);
5855 return tp->col_rend(slab,slice,col);
5860 template<
typename Block>
5862 typename GenericMultiComponent4d<Block>::slab_range_iterator
5864 const GenericMultiComponent4d<Block>::size_type row,
5865 const GenericMultiComponent4d<Block>::size_type col,
5867 return matrix_->slab_begin(slice,row,col,range);
5870 template<
typename Block>
5872 typename GenericMultiComponent4d<Block>::slab_range_iterator
5874 const GenericMultiComponent4d<Block>::size_type row,
5875 const GenericMultiComponent4d<Block>::size_type col,
5877 return matrix_->slab_end(slice,row,col,range);
5880 template<
typename Block>
5882 typename GenericMultiComponent4d<Block>::const_slab_range_iterator
5884 const GenericMultiComponent4d<Block>::size_type row,
5885 const GenericMultiComponent4d<Block>::size_type col,
5887 Matrix4d<Block>
const * tp(matrix_);
5888 return tp->slab_begin(slice,row,col,range);
5891 template<
typename Block>
5893 typename GenericMultiComponent4d<Block>::const_slab_range_iterator
5895 const GenericMultiComponent4d<Block>::size_type row,
5896 const GenericMultiComponent4d<Block>::size_type col,
5898 Matrix4d<Block>
const * tp(matrix_);
5899 return tp->slab_end(slice,row,col,range);
5902 template<
typename Block>
5904 typename GenericMultiComponent4d<Block>::reverse_slab_range_iterator
5906 const GenericMultiComponent4d<Block>::size_type row,
5907 const GenericMultiComponent4d<Block>::size_type col,
5909 return matrix_->slab_rbegin(slice,row,col,range);
5912 template<
typename Block>
5914 typename GenericMultiComponent4d<Block>::reverse_slab_range_iterator
5916 const GenericMultiComponent4d<Block>::size_type row,
5917 const GenericMultiComponent4d<Block>::size_type col,
5919 return matrix_->slab_rend(slice,row,col,range);
5922 template<
typename Block>
5924 typename GenericMultiComponent4d<Block>::const_reverse_slab_range_iterator
5926 const GenericMultiComponent4d<Block>::size_type row,
5927 const GenericMultiComponent4d<Block>::size_type col,
5929 Matrix4d<Block>
const * tp(matrix_);
5930 return tp->slab_rbegin(slice,row,col,range);
5933 template<
typename Block>
5935 typename GenericMultiComponent4d<Block>::const_reverse_slab_range_iterator
5937 const GenericMultiComponent4d<Block>::size_type row,
5938 const GenericMultiComponent4d<Block>::size_type col,
5940 Matrix4d<Block>
const * tp(matrix_);
5941 return tp->slab_rend(slice,row,col,range);
5946 template<
typename Block>
5948 typename GenericMultiComponent4d<Block>::slice_range_iterator
5950 const GenericMultiComponent4d<Block>::size_type row,
5951 const GenericMultiComponent4d<Block>::size_type col,
5953 return matrix_->slice_begin(slab,row,col,range);
5956 template<
typename Block>
5958 typename GenericMultiComponent4d<Block>::slice_range_iterator
5960 const GenericMultiComponent4d<Block>::size_type row,
5961 const GenericMultiComponent4d<Block>::size_type col,
5963 return matrix_->slice_end(slab,row,col,range);
5966 template<
typename Block>
5968 typename GenericMultiComponent4d<Block>::const_slice_range_iterator
5970 const GenericMultiComponent4d<Block>::size_type row,
5971 const GenericMultiComponent4d<Block>::size_type col,
5973 Matrix4d<Block>
const * tp(matrix_);
5974 return tp->slice_begin(slab,row,col,range);
5977 template<
typename Block>
5979 typename GenericMultiComponent4d<Block>::const_slice_range_iterator
5981 const GenericMultiComponent4d<Block>::size_type row,
5982 const GenericMultiComponent4d<Block>::size_type col,
5984 Matrix4d<Block>
const * tp(matrix_);
5985 return tp->slice_end(slab,row,col,range);
5988 template<
typename Block>
5990 typename GenericMultiComponent4d<Block>::reverse_slice_range_iterator
5992 const GenericMultiComponent4d<Block>::size_type row,
5993 const GenericMultiComponent4d<Block>::size_type col,
5995 return matrix_->slice_rbegin(slab,row,col,range);
5998 template<
typename Block>
6000 typename GenericMultiComponent4d<Block>::reverse_slice_range_iterator
6002 const GenericMultiComponent4d<Block>::size_type row,
6003 const GenericMultiComponent4d<Block>::size_type col,
6005 return matrix_->slice_rend(slab,row,col,range);
6008 template<
typename Block>
6010 typename GenericMultiComponent4d<Block>::const_reverse_slice_range_iterator
6012 const GenericMultiComponent4d<Block>::size_type row,
6013 const GenericMultiComponent4d<Block>::size_type col,
6015 Matrix4d<Block>
const * tp(matrix_);
6016 return tp->slice_rbegin(slab,row,col,range);
6019 template<
typename Block>
6021 typename GenericMultiComponent4d<Block>::const_reverse_slice_range_iterator
6023 const GenericMultiComponent4d<Block>::size_type row,
6024 const GenericMultiComponent4d<Block>::size_type col,
6026 Matrix4d<Block>
const * tp(matrix_);
6027 return tp->slice_rend(slab,row,col,range);
6032 template<
typename Block>
6034 typename GenericMultiComponent4d<Block>::row_range_iterator
6036 const GenericMultiComponent4d<Block>::size_type slice,
6037 const GenericMultiComponent4d<Block>::size_type row,
6039 return matrix_->row_begin(slab,slice,row,range);
6042 template<
typename Block>
6044 typename GenericMultiComponent4d<Block>::row_range_iterator
6046 const GenericMultiComponent4d<Block>::size_type slice,
6047 const GenericMultiComponent4d<Block>::size_type row,
6049 return matrix_->row_end(slab,slice,row,range);
6052 template<
typename Block>
6054 typename GenericMultiComponent4d<Block>::const_row_range_iterator
6056 const GenericMultiComponent4d<Block>::size_type slice,
6057 const GenericMultiComponent4d<Block>::size_type row,
6059 Matrix4d<Block>
const * tp(matrix_);
6060 return tp->row_begin(slab,slice,row,range);
6063 template<
typename Block>
6065 typename GenericMultiComponent4d<Block>::const_row_range_iterator
6067 const GenericMultiComponent4d<Block>::size_type slice,
6068 const GenericMultiComponent4d<Block>::size_type row,
6070 Matrix4d<Block>
const * tp(matrix_);
6071 return tp->row_end(slab,slice,row,range);
6074 template<
typename Block>
6076 typename GenericMultiComponent4d<Block>::reverse_row_range_iterator
6078 const GenericMultiComponent4d<Block>::size_type slice,
6079 const GenericMultiComponent4d<Block>::size_type row,
6081 return matrix_->row_rbegin(slab,slice,row,range);
6084 template<
typename Block>
6086 typename GenericMultiComponent4d<Block>::reverse_row_range_iterator
6088 const GenericMultiComponent4d<Block>::size_type slice,
6089 const GenericMultiComponent4d<Block>::size_type row,
6091 return matrix_->row_rend(slab,slice,row,range);
6094 template<
typename Block>
6096 typename GenericMultiComponent4d<Block>::const_reverse_row_range_iterator
6098 const GenericMultiComponent4d<Block>::size_type slice,
6099 const GenericMultiComponent4d<Block>::size_type row,
6101 Matrix4d<Block>
const * tp(matrix_);
6102 return tp->row_rbegin(slab,slice,row,range);
6105 template<
typename Block>
6107 typename GenericMultiComponent4d<Block>::const_reverse_row_range_iterator
6109 const GenericMultiComponent4d<Block>::size_type slice,
6110 const GenericMultiComponent4d<Block>::size_type row,
6112 Matrix4d<Block>
const * tp(matrix_);
6113 return tp->row_rend(slab,slice,row,range);
6118 template<
typename Block>
6120 typename GenericMultiComponent4d<Block>::col_range_iterator
6122 const GenericMultiComponent4d<Block>::size_type slice,
6123 const GenericMultiComponent4d<Block>::size_type col,
6125 return matrix_->col_begin(slab,slice,col,range);
6128 template<
typename Block>
6130 typename GenericMultiComponent4d<Block>::col_range_iterator
6132 const GenericMultiComponent4d<Block>::size_type slice,
6133 const GenericMultiComponent4d<Block>::size_type col,
6135 return matrix_->col_end(slab,slice,col,range);
6138 template<
typename Block>
6140 typename GenericMultiComponent4d<Block>::const_col_range_iterator
6142 const GenericMultiComponent4d<Block>::size_type slice,
6143 const GenericMultiComponent4d<Block>::size_type col,
6145 Matrix4d<Block>
const * tp(matrix_);
6146 return tp->col_begin(slab,slice,col,range);
6149 template<
typename Block>
6151 typename GenericMultiComponent4d<Block>::const_col_range_iterator
6153 const GenericMultiComponent4d<Block>::size_type slice,
6154 const GenericMultiComponent4d<Block>::size_type col,
6156 Matrix4d<Block>
const * tp(matrix_);
6157 return tp->col_end(slab,slice,col,range);
6160 template<
typename Block>
6162 typename GenericMultiComponent4d<Block>::reverse_col_range_iterator
6164 const GenericMultiComponent4d<Block>::size_type slice,
6165 const GenericMultiComponent4d<Block>::size_type col,
6167 return matrix_->col_rbegin(slab,slice,col,range);
6170 template<
typename Block>
6172 typename GenericMultiComponent4d<Block>::reverse_col_range_iterator
6174 const GenericMultiComponent4d<Block>::size_type slice,
6175 const GenericMultiComponent4d<Block>::size_type col,
6177 return matrix_->col_rend(slab,slice,col,range);
6180 template<
typename Block>
6182 typename GenericMultiComponent4d<Block>::const_reverse_col_range_iterator
6184 const GenericMultiComponent4d<Block>::size_type slice,
6185 const GenericMultiComponent4d<Block>::size_type col,
6187 Matrix4d<Block>
const * tp(matrix_);
6188 return tp->col_rbegin(slab,slice,col,range);
6191 template<
typename Block>
6193 typename GenericMultiComponent4d<Block>::const_reverse_col_range_iterator
6195 const GenericMultiComponent4d<Block>::size_type slice,
6196 const GenericMultiComponent4d<Block>::size_type col,
6198 Matrix4d<Block>
const * tp(matrix_);
6199 return tp->col_rend(slab,slice,col,range);
6208 template<
typename Block>
6210 typename GenericMultiComponent4d<Block>::iterator4d
6212 return matrix_->first_front_upper_left();
6215 template<
typename Block>
6219 return matrix_->last_back_bottom_right();
6222 template<
typename Block>
6230 template<
typename Block>
6238 template<
typename Block>
6242 return matrix_->rfirst_front_upper_left();
6245 template<
typename Block>
6249 return matrix_->rlast_back_bottom_right();
6252 template<
typename Block>
6260 template<
typename Block>
6270 template<
typename Block>
6274 return matrix_->first_front_upper_left(box);
6277 template<
typename Block>
6281 return matrix_->last_back_bottom_right(box);
6284 template<
typename Block>
6292 template<
typename Block>
6300 template<
typename Block>
6304 return matrix_->rfirst_front_upper_left(box);
6307 template<
typename Block>
6311 return matrix_->rlast_back_bottom_right(box);
6314 template<
typename Block>
6322 template<
typename Block>
6332 template<
typename Block>
6338 return matrix_->first_front_upper_left(slab_range,slice_range,row_range,col_range);
6341 template<
typename Block>
6347 return matrix_->last_back_bottom_right(slab_range,slice_range,row_range,col_range);
6350 template<
typename Block>
6360 template<
typename Block>
6370 template<
typename Block>
6376 return matrix_->rfirst_front_upper_left(slab_range,slice_range,row_range,col_range);
6379 template<
typename Block>
6385 return matrix_->rlast_back_bottom_right(slab_range,slice_range,row_range,col_range);
6388 template<
typename Block>
6398 template<
typename Block>
6416 template<
typename Block>
6423 template<
typename Block>
6430 template<
typename Block>
6437 template<
typename Block>
6444 template<
typename Block>
6451 template<
typename Block>
6458 template<
typename Block>
6465 template<
typename Block>
6474 template<
typename Block>
6480 Block::SIZE * this->dim2() * this->dim3() * this->dim4());
6483 template<
typename Block>
6485 typename GenericMultiComponent4d<Block>::const_component_slab_iterator
6487 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6489 Block::SIZE * this->dim2() * this->dim3() * this->dim4());
6492 template<
typename Block>
6494 typename GenericMultiComponent4d<Block>::component_slab_iterator
6496 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col){
6498 Block::SIZE * this->dim2() * this->dim3() * this->dim4()));
6501 template<
typename Block>
6503 typename GenericMultiComponent4d<Block>::const_component_slab_iterator
6505 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6507 Block::SIZE * this->dim2() * this->dim3() * this->dim4()));
6510 template<
typename Block>
6512 typename GenericMultiComponent4d<Block>::reverse_component_slab_iterator
6514 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col){
6518 template<
typename Block>
6520 typename GenericMultiComponent4d<Block>::const_reverse_component_slab_iterator
6522 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6526 template<
typename Block>
6528 typename GenericMultiComponent4d<Block>::reverse_component_slab_iterator
6530 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col){
6534 template<
typename Block>
6536 typename GenericMultiComponent4d<Block>::const_reverse_component_slab_iterator
6538 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6544 template<
typename Block>
6546 typename GenericMultiComponent4d<Block>::component_slice_iterator
6548 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col){
6550 Block::SIZE * this->dim3() * this->dim4());
6553 template<
typename Block>
6555 typename GenericMultiComponent4d<Block>::const_component_slice_iterator
6557 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6559 Block::SIZE * this->dim3() * this->dim4());
6562 template<
typename Block>
6564 typename GenericMultiComponent4d<Block>::component_slice_iterator
6566 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col){
6568 Block::SIZE * this->dim3() * this->dim4()));
6571 template<
typename Block>
6573 typename GenericMultiComponent4d<Block>::const_component_slice_iterator
6575 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6577 Block::SIZE * this->dim3() * this->dim4()));
6580 template<
typename Block>
6582 typename GenericMultiComponent4d<Block>::reverse_component_slice_iterator
6584 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col){
6588 template<
typename Block>
6590 typename GenericMultiComponent4d<Block>::const_reverse_component_slice_iterator
6592 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6596 template<
typename Block>
6598 typename GenericMultiComponent4d<Block>::reverse_component_slice_iterator
6600 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col){
6604 template<
typename Block>
6606 typename GenericMultiComponent4d<Block>::const_reverse_component_slice_iterator
6608 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col)
const{
6614 template<
typename Block>
6616 typename GenericMultiComponent4d<Block>::component_row_iterator
6618 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row){
6620 (
typename Block::pointer)this->row_begin(slab,slice,row) + component);
6623 template<
typename Block>
6625 typename GenericMultiComponent4d<Block>::const_component_row_iterator
6627 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row)
const{
6629 (
typename Block::const_pointer)this->row_begin(slab,slice,row) + component);
6632 template<
typename Block>
6634 typename GenericMultiComponent4d<Block>::component_row_iterator
6636 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row){
6638 (
typename Block::pointer)this->row_end(slab,slice,row) + component);
6641 template<
typename Block>
6643 typename GenericMultiComponent4d<Block>::const_component_row_iterator
6645 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row)
const{
6647 (
typename Block::const_pointer)this->row_end(slab,slice,row) + component);
6650 template<
typename Block>
6652 typename GenericMultiComponent4d<Block>::reverse_component_row_iterator
6654 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row){
6658 template<
typename Block>
6660 typename GenericMultiComponent4d<Block>::const_reverse_component_row_iterator
6662 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row)
const{
6666 template<
typename Block>
6668 typename GenericMultiComponent4d<Block>::reverse_component_row_iterator
6670 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row){
6674 template<
typename Block>
6676 typename GenericMultiComponent4d<Block>::const_reverse_component_row_iterator
6678 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row)
const{
6684 template<
typename Block>
6686 typename GenericMultiComponent4d<Block>::component_col_iterator
6688 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col){
6690 Block::SIZE * this->dim4());
6693 template<
typename Block>
6695 typename GenericMultiComponent4d<Block>::const_component_col_iterator
6697 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col)
const{
6699 Block::SIZE * this->dim4());
6702 template<
typename Block>
6704 typename GenericMultiComponent4d<Block>::component_col_iterator
6706 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col){
6708 Block::SIZE * this->dim4()));
6711 template<
typename Block>
6713 typename GenericMultiComponent4d<Block>::const_component_col_iterator
6715 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col)
const{
6717 Block::SIZE * this->dim4()));
6720 template<
typename Block>
6722 typename GenericMultiComponent4d<Block>::reverse_component_col_iterator
6724 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col){
6728 template<
typename Block>
6730 typename GenericMultiComponent4d<Block>::const_reverse_component_col_iterator
6732 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col)
const{
6736 template<
typename Block>
6738 typename GenericMultiComponent4d<Block>::reverse_component_col_iterator
6740 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col){
6744 template<
typename Block>
6746 typename GenericMultiComponent4d<Block>::const_reverse_component_col_iterator
6748 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col)
const{
6754 template<
typename Block>
6756 typename GenericMultiComponent4d<Block>::component_slab_range_iterator
6758 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6761 Block::SIZE * this->dim2() * this->dim3() * this->dim4() * range.
stride());
6764 template<
typename Block>
6766 typename GenericMultiComponent4d<Block>::component_slab_range_iterator
6768 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6772 Block::SIZE * this->dim2() * this->dim3() * this->dim4() * range.
stride()));
6775 template<
typename Block>
6777 typename GenericMultiComponent4d<Block>::const_component_slab_range_iterator
6779 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6782 Block::SIZE * this->dim2() * this->dim3() * this->dim4() * range.
stride());
6785 template<
typename Block>
6787 typename GenericMultiComponent4d<Block>::const_component_slab_range_iterator
6789 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6793 Block::SIZE * this->dim2() * this->dim3() * this->dim4() * range.
stride()));
6796 template<
typename Block>
6798 typename GenericMultiComponent4d<Block>::reverse_component_slab_range_iterator
6800 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6805 template<
typename Block>
6807 typename GenericMultiComponent4d<Block>::reverse_component_slab_range_iterator
6809 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6814 template<
typename Block>
6816 typename GenericMultiComponent4d<Block>::const_reverse_component_slab_range_iterator
6818 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6823 template<
typename Block>
6825 typename GenericMultiComponent4d<Block>::const_reverse_component_slab_range_iterator
6827 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6834 template<
typename Block>
6836 typename GenericMultiComponent4d<Block>::component_slice_range_iterator
6838 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6841 Block::SIZE * this->dim3() * this->dim4() * range.
stride());
6844 template<
typename Block>
6846 typename GenericMultiComponent4d<Block>::component_slice_range_iterator
6848 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6852 Block::SIZE * this->dim3() * this->dim4() * range.
stride()));
6855 template<
typename Block>
6857 typename GenericMultiComponent4d<Block>::const_component_slice_range_iterator
6859 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6862 Block::SIZE * this->dim3() * this->dim4() * range.
stride());
6865 template<
typename Block>
6867 typename GenericMultiComponent4d<Block>::const_component_slice_range_iterator
6869 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6873 Block::SIZE * this->dim3() * this->dim4() * range.
stride()));
6876 template<
typename Block>
6878 typename GenericMultiComponent4d<Block>::reverse_component_slice_range_iterator
6880 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6885 template<
typename Block>
6887 typename GenericMultiComponent4d<Block>::reverse_component_slice_range_iterator
6889 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6894 template<
typename Block>
6896 typename GenericMultiComponent4d<Block>::const_reverse_component_slice_range_iterator
6898 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6903 template<
typename Block>
6905 typename GenericMultiComponent4d<Block>::const_reverse_component_slice_range_iterator
6907 const GenericMultiComponent4d<Block>::size_type row,
const GenericMultiComponent4d<Block>::size_type col,
6914 template<
typename Block>
6916 typename GenericMultiComponent4d<Block>::component_row_range_iterator
6918 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6921 (&((*
this)[slab][slice][row][range.
start()][component]), Block::SIZE * range.
stride());
6924 template<
typename Block>
6926 typename GenericMultiComponent4d<Block>::component_row_range_iterator
6928 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6934 template<
typename Block>
6936 typename GenericMultiComponent4d<Block>::const_component_row_range_iterator
6938 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6941 (&((*
this)[slab][slice][row][range.
start()][component]), Block::SIZE * range.
stride());
6944 template<
typename Block>
6946 typename GenericMultiComponent4d<Block>::const_component_row_range_iterator
6948 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6954 template<
typename Block>
6956 typename GenericMultiComponent4d<Block>::reverse_component_row_range_iterator
6958 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6963 template<
typename Block>
6965 typename GenericMultiComponent4d<Block>::reverse_component_row_range_iterator
6967 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6972 template<
typename Block>
6974 typename GenericMultiComponent4d<Block>::const_reverse_component_row_range_iterator
6976 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6981 template<
typename Block>
6983 typename GenericMultiComponent4d<Block>::const_reverse_component_row_range_iterator
6985 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type row,
6992 template<
typename Block>
6994 typename GenericMultiComponent4d<Block>::component_col_range_iterator
6996 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
6999 Block::SIZE * this->dim4() * range.
stride());
7002 template<
typename Block>
7004 typename GenericMultiComponent4d<Block>::component_col_range_iterator
7006 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
7010 Block::SIZE * this->dim4() * range.
stride()));
7013 template<
typename Block>
7015 typename GenericMultiComponent4d<Block>::const_component_col_range_iterator
7017 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
7020 Block::SIZE * this->dim4() * range.
stride());
7023 template<
typename Block>
7025 typename GenericMultiComponent4d<Block>::const_component_col_range_iterator
7027 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
7031 Block::SIZE * this->dim4() * range.
stride()));
7034 template<
typename Block>
7036 typename GenericMultiComponent4d<Block>::reverse_component_col_range_iterator
7038 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
7043 template<
typename Block>
7045 typename GenericMultiComponent4d<Block>::reverse_component_col_range_iterator
7047 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
7052 template<
typename Block>
7054 typename GenericMultiComponent4d<Block>::const_reverse_component_col_range_iterator
7056 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
7061 template<
typename Block>
7063 typename GenericMultiComponent4d<Block>::const_reverse_component_col_range_iterator
7065 const GenericMultiComponent4d<Block>::size_type slice,
const GenericMultiComponent4d<Block>::size_type col,
7076 template<
typename Block>
7078 typename GenericMultiComponent4d<Block>::component_iterator4d
7081 (
this,component,
Box4d<int>(0,0,0,0,this->dim1()-1,this->dim2()-1,this->dim3()-1,this->dim4()-1));
7084 template<
typename Block>
7088 DPoint4d<int> dp(this->dim1(),this->dim2(),this->dim3(),this->dim4());
7090 (*this).first_front_upper_left(component) + dp;
7094 template<
typename Block>
7099 (
this,component,
Box4d<int>(0,0,0,0,this->dim1()-1,this->dim2()-1,this->dim3()-1,this->dim4()-1));
7102 template<
typename Block>
7106 DPoint4d<int> dp(this->dim1(),this->dim2(),this->dim3(),this->dim4());
7108 (*this).first_front_upper_left(component) + dp;
7112 template<
typename Block>
7118 (this->last_back_bottom_right(component) - dp);
7121 template<
typename Block>
7126 (this->first_front_upper_left(component));
7129 template<
typename Block>
7135 (this->last_back_bottom_right(component) - dp);
7138 template<
typename Block>
7143 (this->first_front_upper_left(component));
7148 template<
typename Block>
7156 template<
typename Block>
7163 ((*this).first_front_upper_left(component,box) + dp));
7166 template<
typename Block>
7174 template<
typename Block>
7181 ((*this).first_front_upper_left(component,box) + dp));
7184 template<
typename Block>
7191 (this->last_back_bottom_right(component,box) - dp);
7194 template<
typename Block>
7200 (this->first_front_upper_left(component,box));
7203 template<
typename Block>
7210 (this->last_back_bottom_right(component,box) - dp);
7213 template<
typename Block>
7219 (this->first_front_upper_left(component,box));
7224 template<
typename Block>
7231 (
this,component,slab_range,slice_range,row_range,col_range);
7234 template<
typename Block>
7242 ((*this).first_front_upper_left(component,slab_range,slice_range,row_range,col_range) + dp);
7245 template<
typename Block>
7252 (
this,component,slab_range,slice_range,row_range,col_range);
7255 template<
typename Block>
7263 ((*this).first_front_upper_left(component,slab_range,slice_range,row_range,col_range) + dp);
7266 template<
typename Block>
7274 (this->last_back_bottom_right(component,slab_range,slice_range,row_range,col_range) - dp);
7277 template<
typename Block>
7284 (this->first_front_upper_left(component,slab_range,slice_range,row_range,col_range));
7287 template<
typename Block>
7295 (this->last_back_bottom_right(component,slab_range,slice_range,row_range,col_range) - dp);
7298 template<
typename Block>
7305 (this->first_front_upper_left(component,slab_range,slice_range,row_range,col_range));
7310 template<
typename Block>
7312 std::ostream& operator<<(std::ostream & out, const GenericMultiComponent4d<Block>& a){
7313 out << *(a.matrix_);
7319 template<
typename Block>
7321 GenericMultiComponent4d<Block>& GenericMultiComponent4d<Block>::operator=
7325 *matrix_ = *(rhs.matrix_);
7330 template<
typename Block>
7334 std::fill_n(matrix_->begin(),matrix_->size(),val);
7338 template<
typename Block>
7341 (
const typename Block::value_type& val){
7342 std::fill_n(matrix_->begin(),matrix_->size(),val);
7347 template<
typename Block>
7355 template<
typename Block>
7363 template<
typename Block>
7365 typename GenericMultiComponent4d<Block>::pointer**
7367 return (*matrix_)[t];
7370 template<
typename Block>
7372 typename GenericMultiComponent4d<Block>::const_pointer*
const *
7374 Matrix4d<Block>
const *tp(matrix_);
7378 template<
typename Block>
7380 typename GenericMultiComponent4d<Block>::reference
7382 const GenericMultiComponent4d<Block>::size_type k,
7383 const GenericMultiComponent4d<Block>::size_type i,
7384 const GenericMultiComponent4d<Block>::size_type j){
7385 return (*matrix_)[t][k][i][j];
7388 template<
typename Block>
7390 typename GenericMultiComponent4d<Block>::const_reference
7392 const GenericMultiComponent4d<Block>::size_type k,
7393 const GenericMultiComponent4d<Block>::size_type i,
7394 const GenericMultiComponent4d<Block>::size_type j)
const{
7395 Matrix4d<Block>
const *tp(matrix_);
7396 return (*tp)[t][k][i][j];
7399 template<
typename Block>
7401 typename GenericMultiComponent4d<Block>::size_type
7403 return matrix_->dim1();
7406 template<
typename Block>
7410 return matrix_->dim1();
7413 template<
typename Block>
7417 return matrix_->dim2();
7420 template<
typename Block>
7424 return matrix_->dim2();
7427 template<
typename Block>
7431 return matrix_->dim3();
7434 template<
typename Block>
7438 return matrix_->dim3();
7441 template<
typename Block>
7445 return matrix_->dim4();
7448 template<
typename Block>
7452 return matrix_->dim4();
7455 template<
typename Block>
7459 return matrix_->dim4();
7462 template<
typename Block>
7466 return matrix_->size();
7469 template<
typename Block>
7473 return matrix_->max_size();
7476 template<
typename Block>
7480 return matrix_->empty();
7483 template<
typename Block>
7487 matrix_->swap(*(M.matrix_));
7490 template<
typename Block>
7497 typename Block::value_type
min = *std::min_element(this->begin(component),this->end(component));
7498 tmp[component] =
min;
7503 template<
typename Block>
7510 typename Block::value_type
max = *std::max_element(this->begin(component),this->end(component));
7511 tmp[component] =
max;
7516 template<
typename Block>
7520 matrix_->apply(fun);
7524 template<
typename Block>
7528 matrix_->apply(fun);
7534 #endif //SLIP_GENERICMULTICOMPONENT4D_HPP
std::reverse_iterator< const_component_slab_range_iterator > const_reverse_component_slab_range_iterator
std::reverse_iterator< const_slab_iterator > const_reverse_slab_iterator
bool operator!=(const Array< T > &x, const Array< T > &y)
std::reverse_iterator< iterator4d > reverse_iterator4d
std::reverse_iterator< component_col_range_iterator > reverse_component_col_range_iterator
std::reverse_iterator< component_slice_range_iterator > reverse_component_slice_range_iterator
This is some iterator to iterate a 4d container into a Box area defined by the subscripts of the 4d c...
std::size_t iterations() const
Rerturns the number of iterations of the range.
iterator4d first_front_upper_left()
Returns a read/write iterator4d that points to the first element of the Matrix4d. It points to the fi...
reverse_col_iterator col_rend(const size_type slab, const size_type slice, const size_type col)
Returns a read/write reverse iterator that points to the first element of the column column of the sl...
pointer ** operator[](const size_type t)
Subscript access to the slice datas contained in the GenericMultiComponent4d.
reverse_iterator4d rfirst_front_upper_left()
Returns a read/write reverse iterator4d. It points to the last back bottom right element of the Matri...
std::reverse_iterator< const_component_slab_iterator > const_reverse_component_slab_iterator
slip::stride_iterator< const_slice_iterator > const_slice_range_iterator
slip::stride_iterator< const_block_pointer > const_component_col_range_iterator
Array4d< Block >::iterator4d iterator4d
iterator4d last_back_bottom_right()
Returns a read/write iterator4d that points to the past the end element of the Matrix4d. It points to past the end element of the last back bottom right element of the Matrix4d.
size_type cols() const
Returns the number of columns (fourth dimension size) in the GenericMultiComponent4d.
Array4d< Block >::iterator4d_range iterator4d_range
size_type rows() const
Returns the number of rows (third dimension size) in the GenericMultiComponent4d. ...
size_type dim2() const
Returns the number of slices (second dimension size) in the GenericMultiComponent4d.
std::reverse_iterator< const_iterator4d > const_reverse_iterator4d
const_component_iterator const_component_row_iterator
slice_iterator slice_end(const size_type slab, const size_type row, const size_type col)
Returns a read/write iterator that points to the one past the end element of the line (slab...
reverse_slab_iterator slab_rend(const size_type slice, const size_type row, const size_type col)
Returns a read/write iterator that points to the one before the first element of the line (slice...
slip::stride_iterator< block_pointer > component_slice_range_iterator
component_iterator component_row_iterator
reference operator()(const size_type t, const size_type k, const size_type i, const size_type j)
Subscript access to the data contained in the GenericMultiComponent4d.
slip::stride_iterator< block_pointer > component_slice_iterator
void fill(InputIterator first, InputIterator last)
Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)
GenericMultiComponent4d(const size_type slabs, const size_type slices, const size_type rows, const size_type cols, InputIterator first, InputIterator last)
Contructs a GenericMultiComponent4d from a range.
slice_iterator slice_begin(const size_type slab, const size_type row, const size_type col)
Returns a read/write iterator that points to the first element of the line (slab,row,col) through the slices in the GenericMultiComponent4d. Iteration is done in ordinary element order (increasing slice number).
GenericMultiComponent4d< Block > & apply(Block(*fun)(Block))
Returns the sums of the elements of the GenericMultiComponent4d.
std::reverse_iterator< const_row_range_iterator > const_reverse_row_range_iterator
std::reverse_iterator< const_slab_range_iterator > const_reverse_slab_range_iterator
CoordType depth() const
compute the depth of the Box4d (second dimension size).
std::reverse_iterator< const_component_col_iterator > const_reverse_component_col_iterator
reverse_iterator4d rlast_back_bottom_right()
Returns a read/write reverse iterator4d. It points to past the first front upper left element of the ...
Block max() const
Returns the max elements of the GenericMultiComponent4d according to the operator <...
This is some iterator to iterate a 4d container into two Range defined by the indices and strides of ...
This is a GenericMultiComponent4d class. This container statisfies the BidirectionnalContainer concep...
Numerical matrix4d class. This container statisfies the RandomAccessContainer concepts of the STL exc...
T & min(const GrayscaleImage< T > &M1)
Returns the min element of a GrayscaleImage.
slip::stride_iterator< const_block_pointer > const_component_slab_range_iterator
std::reverse_iterator< const_col_iterator > const_reverse_col_iterator
iterator begin()
Returns a read/write iterator that points to the first element in the GenericMultiComponent4d. Iteration is done in ordinary element order.
This is some iterator to iterate a 4d container into a Box area defined by the subscripts of the 4d c...
std::reverse_iterator< component_col_iterator > reverse_component_col_iterator
slip::stride_iterator< const_block_pointer > const_component_col_iterator
size_type columns() const
Returns the number of columns (fourth dimension size) in the GenericMultiComponent4d.
Provides a class to iterate a 4d multicomponent container into four Ranges.
size_type dim4() const
Returns the number of columns (fourth dimension size) in the GenericMultiComponent4d.
slip::stride_iterator< pointer > slab_iterator
This is some iterator to iterate a 4d MultiComponentContainer into a Box area defined by the indices ...
Array4d< Block >::const_iterator4d_range const_iterator4d_range
std::reverse_iterator< const_slice_iterator > const_reverse_slice_iterator
std::reverse_iterator< col_range_iterator > reverse_col_range_iterator
std::reverse_iterator< const_slice_range_iterator > const_reverse_slice_range_iterator
slip::stride_iterator< const_block_pointer > const_component_slab_iterator
slip::kstride_iterator< typename Block::pointer, Block::SIZE > component_iterator
reverse_slice_iterator slice_rend(const size_type slab, const size_type row, const size_type col)
Returns a read/write iterator that points to the one before the first element of the line (slab...
reverse_slab_iterator slab_rbegin(const size_type slice, const size_type row, const size_type col)
Returns a read/write iterator that points to the last element of the line (slice,row,col) through the slabs in the GenericMultiComponent4d. Iteration is done in reverse element order (decreasing slab number).
slab_iterator slab_end(const size_type slice, const size_type row, const size_type col)
Returns a read/write iterator that points to the one past the end element of the line (slice...
slip::stride_iterator< pointer > row_range_iterator
size_type max_size() const
Returns the maximal size (number of elements) in the GenericMultiComponent4d.
slip::stride_iterator< const_block_pointer > const_component_slice_iterator
This is a Box4d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 4...
std::reverse_iterator< component_slab_iterator > reverse_component_slab_iterator
std::reverse_iterator< const_component_row_range_iterator > const_reverse_component_row_range_iterator
std::reverse_iterator< component_iterator > reverse_component_iterator
const block_value_type const_block_reference
iterator4d default_iterator
slip::const_component_iterator4d_range< const_self, Block::SIZE > const_component_iterator4d_range
size_type dim3() const
Returns the number of rows (third dimension size) in the GenericMultiComponent4d. ...
slip::component_iterator4d_range< self, Block::SIZE > component_iterator4d_range
void fill(std::vector< InputIterator > first_iterators_list, InputIterator last)
Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)
row_iterator row_begin(const size_type slab, const size_type slice, const size_type row)
Returns a read/write iterator that points to the first element of the row row of the slice slice and ...
std::reverse_iterator< const_component_slice_iterator > const_reverse_component_slice_iterator
slip::stride_iterator< block_pointer > component_row_range_iterator
slip::stride_iterator< const_block_pointer > const_component_row_range_iterator
Provides a class to iterate a 1d range according to a constant step.
size_type dim1() const
Returns the number of slabs (first dimension size) in the GenericMultiComponent4d.
GenericMultiComponent4d(const size_type slabs, const size_type slices, const size_type rows, const size_type cols, std::vector< InputIterator > first_iterators_list, InputIterator last)
Contructs a GenericMultiComponent4d from a 3 ranges.
Provides a class to manipulate Matrix4d.
const_component_iterator4d_box< const_self, Block::SIZE > const_component_iterator4d
std::reverse_iterator< component_slab_range_iterator > reverse_component_slab_range_iterator
slip::stride_iterator< block_pointer > component_col_iterator
void fill(const Block &value)
Fills the container range [begin(),begin()+size()) with copies of value.
reverse_row_iterator row_rend(const size_type slab, const size_type slice, const size_type row)
Returns a read/write reverse iterator that points to the first element of the row row of the slice sl...
This is some iterator to iterate a 4d container into two Range defined by the indices and strides of ...
const GenericMultiComponent4d< Block > const_self
std::reverse_iterator< const_iterator > const_reverse_row_iterator
slip::stride_iterator< const_pointer > const_row_range_iterator
std::reverse_iterator< iterator > reverse_row_iterator
reverse_slice_iterator slice_rbegin(const size_type slab, const size_type row, const size_type col)
Returns a read/write iterator that points to the last element of the line (slab,row,col) through the slices in the GenericMultiComponent4d. Iteration is done in reverse element order (decreasing slice number).
slip::stride_iterator< const_col_iterator > const_col_range_iterator
std::reverse_iterator< slice_range_iterator > reverse_slice_range_iterator
std::reverse_iterator< const_component_iterator4d > const_reverse_component_iterator4d
Difference of Point4D class, specialization of DPoint<CoordType,DIM> with DIM = 4.
slip::stride_iterator< slice_iterator > slice_range_iterator
Block min() const
Returns the min elements of the GenericMultiComponent4d according to the operator <...
slip::stride_iterator< block_pointer > component_slab_range_iterator
This is a point4d class, a specialized version of Point<CoordType,DIM> with DIM = 4...
void swap(self &M)
Swaps data with another GenericMultiComponent4d.
bool empty() const
Returns true if the GenericMultiComponent4d is empty. (Thus size() == 0)
std::reverse_iterator< col_iterator > reverse_col_iterator
const_iterator begin() const
Returns a read-only (constant) iterator that points to the first element in the Matrix4d. Iteration is done in ordinary element order.
ptrdiff_t difference_type
void copy(_II first, _II last, _OI output_first)
Copy algorithm optimized for slip iterators.
std::reverse_iterator< const_component_slice_range_iterator > const_reverse_component_slice_range_iterator
SubType start() const
Accessor of the start subscript of the Range.
slip::stride_iterator< pointer > col_iterator
size_type slices() const
Returns the number of slices (second dimension size) in the GenericMultiComponent4d.
iterator end()
Returns a read/write iterator that points one past the last element in the Matrix4d. Iteration is done in ordinary element order.
Block::value_type block_value_type
slip::stride_iterator< block_pointer > component_slab_iterator
slab_iterator slab_begin(const size_type slice, const size_type row, const size_type col)
Returns a read/write iterator that points to the first element of the line (slice,row,col) through the slabs in the GenericMultiComponent4d. Iteration is done in ordinary element order (increasing slab number).
slip::stride_iterator< const_block_pointer > const_component_slice_range_iterator
iterator end()
Returns a read/write iterator that points one past the last element in the GenericMultiComponent4d. Iteration is done in ordinary element order.
Array4d< Block >::const_iterator4d const_iterator4d
static const std::size_t DIM
block_value_type & block_reference
void fill(const typename Block::pointer value)
Fills the container range [begin(),begin()+size()) with a copy of the value array.
std::reverse_iterator< slab_range_iterator > reverse_slab_range_iterator
slip::stride_iterator< const_pointer > const_col_iterator
std::reverse_iterator< iterator4d_range > reverse_iterator4d_range
std::reverse_iterator< const_col_range_iterator > const_reverse_col_range_iterator
block_value_type * block_pointer
reverse_col_iterator col_rbegin(const size_type slab, const size_type slice, const size_type col)
Returns a read/write reverse iterator that points to the last element of the column column of the sli...
std::reverse_iterator< component_slice_iterator > reverse_component_slice_iterator
This is some iterator to iterate a 4d container into two Range defined by the indices and strides of ...
const_iterator4d const_default_iterator
static const std::size_t COMPONENTS
CoordType width() const
compute the width of the Box4d (fourth dimension size).
GenericMultiComponent4d()
Constructs a GenericMultiComponent4d.
component_iterator4d_box< self, Block::SIZE > component_iterator4d
std::reverse_iterator< const_iterator4d_range > const_reverse_iterator4d_range
const block_value_type * const_block_pointer
value_type const & const_reference
const_pointer const_row_iterator
slip::kstride_iterator< typename Block::const_pointer, Block::SIZE > const_component_iterator
reverse_iterator4d rfirst_front_upper_left()
Returns a read/write reverse iterator4d. It points to the last back bottom right element of the Gener...
std::reverse_iterator< component_iterator4d_range > reverse_component_iterator4d_range
value_type const * const_pointer
std::reverse_iterator< slab_iterator > reverse_slab_iterator
Some const iterator to iterate a 4d container into two Range defined by the indices and strides of th...
std::reverse_iterator< const_component_iterator4d_range > const_reverse_component_iterator4d_range
slip::stride_iterator< const_slab_iterator > const_slab_range_iterator
slip::stride_iterator< const_pointer > const_slice_iterator
iterator4d last_back_bottom_right()
Returns a read/write iterator4d that points to the past the end element of the GenericMultiComponent4...
int stride() const
Accessor of the stride of the Range.
std::reverse_iterator< const_component_iterator > const_reverse_component_iterator
CoordType duration() const
compute the duration of the Box4d (first dimension size).
slip::stride_iterator< block_pointer > component_col_range_iterator
Provides a class to manipulate Numerical Matrix.
Provides some algorithms to apply C like functions to ranges.
std::reverse_iterator< iterator > reverse_iterator
std::reverse_iterator< const_component_row_iterator > const_reverse_component_row_iterator
Provides a class to manipulate iterator4d within a slip::Range. It is used to iterate throw 4d contai...
Provides a class to iterate a 1d range according to a step.
size_type size() const
Returns the number of elements in the GenericMultiComponent4d.
virtual ~GenericMultiComponent4d()
Destructor of the GenericMultiComponent4d.
CoordType height() const
compute the height of the Box4d (third dimension size).
slip::stride_iterator< const_pointer > const_slab_iterator
std::reverse_iterator< component_row_range_iterator > reverse_component_row_range_iterator
std::reverse_iterator< component_iterator4d > reverse_component_iterator4d
Provides a class to iterate a 4d MultiComponentContainer into a slip::Box4d.
const_pointer const_iterator
void fill(const Block *value)
Fills the container range [begin(),begin()+size()) with a copy of the value array.
bool operator==(const Array< T > &x, const Array< T > &y)
slip::stride_iterator< pointer > slice_iterator
row_iterator row_end(const size_type slab, const size_type slice, const size_type row)
Returns a read/write iterator that points to the past-the-end element of the row row of the slice sli...
reverse_row_iterator row_rbegin(const size_type slab, const size_type slice, const size_type row)
Returns a read/write reverse iterator that points to the last element of the row row of the slice sli...
Provides a class to manipulate iterator4d within a slip::Box4d. It is used to iterate throw 4d contai...
self & operator=(const self &rhs)
Assign a GenericMultiComponent4d. Assign elements from the GenericMultiComponent4d rhs...
std::reverse_iterator< const_component_col_range_iterator > const_reverse_component_col_range_iterator
std::reverse_iterator< slice_iterator > reverse_slice_iterator
std::reverse_iterator< component_row_iterator > reverse_component_row_iterator
reverse_iterator4d rlast_back_bottom_right()
Returns a read/write reverse iterator4d. It points to past the first front upper left element of the ...
col_iterator col_begin(const size_type slab, const size_type slice, const size_type col)
Returns a read/write iterator that points to the first element of the column column of the slice slic...
iterator4d first_front_upper_left()
Returns a read/write iterator4d that points to the first element of the GenericMultiComponent4d. It points to the first front upper left element of the GenericMultiComponent4d.
T & max(const GrayscaleImage< T > &M1)
Returns the max element of a GrayscaleImage.
void fill(std::size_t component, InputIterator first, InputIterator last)
Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)
size_type slabs() const
Returns the number of slabs (first dimension size) in the GenericMultiComponent4d.
slip::stride_iterator< slab_iterator > slab_range_iterator
col_iterator col_end(const size_type slab, const size_type slice, const size_type col)
Returns a read/write iterator that points to the past-the-end element of the column column of the sli...
reverse_iterator rbegin()
Returns a read/write reverse iterator that points to the last element in the GenericMultiComponent4d...
This is some iterator to iterate a 4d MultiComponentContainer into a Box area defined by the indices ...
reverse_iterator rend()
Returns a read/write reverse iterator that points to one before the first element in the GenericMulti...
slip::stride_iterator< col_iterator > col_range_iterator
void resize(const size_type slabs, const size_type slices, const size_type rows, const size_type cols, const Block &val=Block())
Resizes a GenericMultiComponent4d.
std::reverse_iterator< row_range_iterator > reverse_row_range_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator