74 #ifndef SLIP_MATRIX3D_HPP
75 #define SLIP_MATRIX3D_HPP
92 #include <boost/serialization/access.hpp>
93 #include <boost/serialization/split_member.hpp>
94 #include <boost/serialization/string.hpp>
95 #include <boost/serialization/complex.hpp>
96 #include <boost/serialization/version.hpp>
101 template <
typename T>
104 template <
typename T>
107 template <
typename T>
108 std::ostream& operator<<(std::ostream & out, const slip::Matrix3d<T>& a);
119 bool operator<(const slip::Matrix3d<T>& x,
127 bool operator<=(const slip::Matrix3d<T>& x,
154 template <
typename T>
204 #ifdef ALL_PLANE_ITERATOR3D
208 typedef std::reverse_iterator<iterator1d> reverse_iterator1d;
209 typedef std::reverse_iterator<const_iterator1d> const_reverse_iterator1d;
210 #endif //ALL_PLANE_ITERATOR3D
233 static const std::size_t
DIM = 3;
257 const std::size_t d2,
258 const std::size_t d3);
268 const std::size_t d2,
269 const std::size_t d3,
279 const std::size_t d2,
280 const std::size_t d3,
295 template<
typename InputIterator>
301 array_(new slip::
Array3d<T>(d1,d2,d3,first,last))
327 void resize(std::size_t d1,
1707 #ifdef ALL_PLANE_ITERATOR3D
2178 #endif //ALL_PLANE_ITERATOR3D
3161 friend std::ostream& operator<< <>(std::ostream & out,
3199 std::fill_n(this->
begin(),this->
size(),value);
3221 template<
typename InputIterator>
3366 std::string
name()
const;
3527 friend class boost::serialization::access;
3528 template<
class Archive>
3529 void save(Archive & ar,
const unsigned int version)
const
3533 template<
class Archive>
3534 void load(Archive & ar,
const unsigned int version)
3538 BOOST_SERIALIZATION_SPLIT_MEMBER();
3575 template<
typename T>
3576 Matrix3d<T>
operator+(
const Matrix3d<T>& M1,
3577 const Matrix3d<T>& M2);
3585 template<
typename T>
3586 Matrix3d<T>
operator+(
const Matrix3d<T>& M1,
3595 template<
typename T>
3597 const Matrix3d<T>& M1);
3607 template<
typename T>
3608 Matrix3d<T>
operator-(
const Matrix3d<T>& M1,
3609 const Matrix3d<T>& M2);
3617 template<
typename T>
3618 Matrix3d<T>
operator-(
const Matrix3d<T>& M1,
3627 template<
typename T>
3629 const Matrix3d<T>& M1);
3639 template<
typename T>
3640 Matrix3d<T>
operator*(
const Matrix3d<T>& M1,
3641 const Matrix3d<T>& M2);
3649 template<
typename T>
3650 Matrix3d<T>
operator*(
const Matrix3d<T>& M1,
3659 template<
typename T>
3661 const Matrix3d<T>& M1);
3671 template<
typename T>
3672 Matrix3d<T>
operator/(
const Matrix3d<T>& M1,
3673 const Matrix3d<T>& M2);
3681 template<
typename T>
3682 Matrix3d<T>
operator/(
const Matrix3d<T>& M1,
3693 template<
typename T>
3694 T&
min(
const Matrix3d<T>& M1);
3702 template<
typename T>
3703 T&
max(
const Matrix3d<T>& M1);
3711 template<
typename T>
3712 Matrix3d<T>
abs(
const Matrix3d<T>& V);
3720 template<
typename T>
3721 Matrix3d<T>
sqrt(
const Matrix3d<T>& V);
3729 template<
typename T>
3730 Matrix3d<T>
cos(
const Matrix3d<T>& V);
3738 template<
typename T>
3739 Matrix3d<T>
acos(
const Matrix3d<T>& V);
3747 template<
typename T>
3748 Matrix3d<T>
sin(
const Matrix3d<T>& V);
3756 template<
typename T>
3757 Matrix3d<T>
asin(
const Matrix3d<T>& V);
3766 template<
typename T>
3767 Matrix3d<T>
tan(
const Matrix3d<T>& V);
3775 template<
typename T>
3776 Matrix3d<T>
atan(
const Matrix3d<T>& V);
3784 template<
typename T>
3785 Matrix3d<T>
exp(
const Matrix3d<T>& V);
3793 template<
typename T>
3794 Matrix3d<T>
log(
const Matrix3d<T>& V);
3802 template<
typename T>
3803 Matrix3d<T>
cosh(
const Matrix3d<T>& V);
3811 template<
typename T>
3812 Matrix3d<T>
sinh(
const Matrix3d<T>& V);
3820 template<
typename T>
3821 Matrix3d<T>
tanh(
const Matrix3d<T>& V);
3829 template<
typename T>
3830 Matrix3d<T>
log10(
const Matrix3d<T>& V);
3842 template<
typename T>
3845 array_(new slip::
Array3d<T>())
3848 template<
typename T>
3853 array_(new slip::
Array3d<T>(d1,d2,d3))
3856 template<
typename T>
3862 array_(new slip::
Array3d<T>(d1,d2,d3,val))
3865 template<
typename T>
3871 array_(new slip::
Array3d<T>(d1,d2,d3,val))
3875 template<
typename T>
3878 array_(new slip::
Array3d<T>((*rhs.array_)))
3881 template<
typename T>
3894 template<
typename T>
3900 *array_ = *(rhs.array_);
3905 template<
typename T>
3909 std::fill_n((*array_)[0][0],array_->size(),value);
3913 template<
typename T>
3920 array_->
resize(d1,d2,d3,val);
3937 template<
typename T>
3941 return array_->
begin();
3944 template<
typename T>
3948 return array_->
end();
3951 template<
typename T>
3959 template<
typename T>
3968 template<
typename T>
3975 template<
typename T>
3982 template<
typename T>
3989 template<
typename T>
3998 template<
typename T>
4007 template<
typename T>
4013 Array3d<T>
const * tp(array_);
4014 return tp->slice_begin(row,col);
4017 template<
typename T>
4023 return array_->slice_end(row,col);
4026 template<
typename T>
4032 Array3d<T>
const * tp(array_);
4033 return tp->slice_end(row,col);
4037 template<
typename T>
4043 return array_->slice_rbegin(row,col);
4046 template<
typename T>
4052 Array3d<T>
const * tp(array_);
4053 return tp->slice_rbegin(row,col);
4056 template<
typename T>
4062 return array_->slice_rend(row,col);
4066 template<
typename T>
4072 Array3d<T>
const * tp(array_);
4073 return tp->slice_rend(row,col);
4078 template<
typename T>
4084 return array_->row_begin(slice,row);
4087 template<
typename T>
4093 Array3d<T>
const * tp(array_);
4094 return tp->row_begin(slice,row);
4097 template<
typename T>
4103 return array_->row_end(slice,row);
4106 template<
typename T>
4112 Array3d<T>
const * tp(array_);
4113 return tp->row_end(slice,row);
4117 template<
typename T>
4123 return array_->row_rbegin(slice,row);
4126 template<
typename T>
4132 Array3d<T>
const * tp(array_);
4133 return tp->row_rbegin(slice,row);
4137 template<
typename T>
4143 return array_->row_rend(slice,row);
4146 template<
typename T>
4152 Array3d<T>
const * tp(array_);
4153 return tp->row_rend(slice,row);
4158 template<
typename T>
4164 return array_->col_begin(slice,col);
4167 template<
typename T>
4173 Array3d<T>
const * tp(array_);
4174 return tp->col_begin(slice,col);
4178 template<
typename T>
4184 return array_->col_end(slice,col);
4187 template<
typename T>
4193 Array3d<T>
const * tp(array_);
4194 return tp->col_end(slice,col);
4198 template<
typename T>
4204 return array_->col_rbegin(slice,col);
4207 template<
typename T>
4213 Array3d<T>
const * tp(array_);
4214 return tp->col_rbegin(slice,col);
4218 template<
typename T>
4224 return array_->col_rend(slice,col);
4227 template<
typename T>
4233 Array3d<T>
const * tp(array_);
4234 return tp->col_rend(slice,col);
4239 template<
typename T>
4246 return array_->slice_begin(row,col,range);
4249 template<
typename T>
4256 Array3d<T>
const * tp(array_);
4257 return tp->slice_begin(row,col,range);
4260 template<
typename T>
4267 return array_->slice_end(row,col,range);
4270 template<
typename T>
4277 Array3d<T>
const * tp(array_);
4278 return tp->slice_end(row,col,range);
4281 template<
typename T>
4288 return array_->slice_rbegin(row,col,range);
4291 template<
typename T>
4297 Array3d<T>
const * tp(array_);
4298 return tp->slice_rbegin(row,col,range);
4301 template<
typename T>
4307 return array_->slice_rend(row,col,range);
4310 template<
typename T>
4316 Array3d<T>
const * tp(array_);
4317 return tp->slice_rend(row,col,range);
4323 template<
typename T>
4330 return array_->row_begin(slice,row,range);
4333 template<
typename T>
4340 Array3d<T>
const * tp(array_);
4341 return tp->row_begin(slice,row,range);
4344 template<
typename T>
4351 return array_->row_end(slice,row,range);
4354 template<
typename T>
4361 Array3d<T>
const * tp(array_);
4362 return tp->row_end(slice,row,range);
4365 template<
typename T>
4372 return array_->row_rbegin(slice,row,range);
4375 template<
typename T>
4382 Array3d<T>
const * tp(array_);
4383 return tp->row_rbegin(slice,row,range);
4386 template<
typename T>
4393 return array_->row_rend(slice,row,range);
4396 template<
typename T>
4403 Array3d<T>
const * tp(array_);
4404 return tp->row_rend(slice,row,range);
4409 template<
typename T>
4416 return array_->col_begin(slice,col,range);
4419 template<
typename T>
4426 Array3d<T>
const * tp(array_);
4427 return tp->col_begin(slice,col,range);
4430 template<
typename T>
4437 return array_->col_end(slice,col,range);
4440 template<
typename T>
4447 Array3d<T>
const * tp(array_);
4448 return tp->col_end(slice,col,range);
4451 template<
typename T>
4458 return array_->col_rbegin(slice,col,range);
4461 template<
typename T>
4468 Array3d<T>
const * tp(array_);
4469 return tp->col_rbegin(slice,col,range);
4472 template<
typename T>
4479 return array_->col_rend(slice,col,range);
4482 template<
typename T>
4489 Array3d<T>
const * tp(array_);
4490 return tp->col_rend(slice,col,range);
4496 template<
typename T>
4501 return array_->plane_begin(slice);
4504 template<
typename T>
4509 Array3d<T>
const * tp(array_);
4510 return tp->plane_begin(slice);
4513 template<
typename T>
4518 return array_->plane_end(slice);
4521 template<
typename T>
4526 Array3d<T>
const * tp(array_);
4527 return tp->plane_end(slice);
4530 template<
typename T>
4535 return array_->plane_rbegin(slice);
4538 template<
typename T>
4543 Array3d<T>
const * tp(array_);
4544 return tp->plane_rbegin(slice);
4547 template<
typename T>
4552 return array_->plane_rend(slice);
4555 template<
typename T>
4560 Array3d<T>
const * tp(array_);
4561 return tp->plane_rend(slice);
4564 #ifdef ALL_PLANE_ITERATOR3D
4569 template<
typename T>
4571 typename Matrix3d<T>::iterator1d
4575 return array_->plane_row_begin(P,plane_coordinate,row);
4578 template<
typename T>
4580 typename Matrix3d<T>::const_iterator1d
4584 Array3d<T>
const * tp(array_);
4585 return tp->plane_row_begin(P,plane_coordinate,row);
4588 template<
typename T>
4590 typename Matrix3d<T>::iterator1d
4594 return array_->plane_row_end(P,plane_coordinate,row);
4597 template<
typename T>
4599 typename Matrix3d<T>::const_iterator1d
4603 Array3d<T>
const * tp(array_);
4604 return tp->plane_row_end(P,plane_coordinate,row);
4607 template<
typename T>
4609 typename Matrix3d<T>::reverse_iterator1d
4613 return array_->plane_row_rbegin(P,plane_coordinate,row);
4616 template<
typename T>
4618 typename Matrix3d<T>::const_reverse_iterator1d
4622 Array3d<T>
const * tp(array_);
4623 return tp->plane_row_rbegin(P,plane_coordinate,row);
4626 template<
typename T>
4628 typename Matrix3d<T>::reverse_iterator1d
4632 return array_->plane_row_rend(P,plane_coordinate,row);
4635 template<
typename T>
4637 typename Matrix3d<T>::const_reverse_iterator1d
4641 Array3d<T>
const * tp(array_);
4642 return tp->plane_row_rend(P,plane_coordinate,row);
4645 template<
typename T>
4647 typename Matrix3d<T>::iterator1d
4651 return array_->plane_col_begin(P,plane_coordinate,col);
4654 template<
typename T>
4656 typename Matrix3d<T>::const_iterator1d
4660 Array3d<T>
const * tp(array_);
4661 return tp->plane_col_begin(P,plane_coordinate,col);
4664 template<
typename T>
4666 typename Matrix3d<T>::iterator1d
4670 return array_->plane_col_end(P,plane_coordinate,col);
4673 template<
typename T>
4675 typename Matrix3d<T>::const_iterator1d
4679 Array3d<T>
const * tp(array_);
4680 return tp->plane_col_end(P,plane_coordinate,col);
4683 template<
typename T>
4685 typename Matrix3d<T>::reverse_iterator1d
4689 return array_->plane_col_rbegin(P,plane_coordinate,col);
4692 template<
typename T>
4694 typename Matrix3d<T>::const_reverse_iterator1d
4698 Array3d<T>
const * tp(array_);
4699 return tp->plane_col_rbegin(P,plane_coordinate,col);
4702 template<
typename T>
4704 typename Matrix3d<T>::reverse_iterator1d
4708 return array_->plane_col_rend(P,plane_coordinate,col);
4711 template<
typename T>
4713 typename Matrix3d<T>::const_reverse_iterator1d
4717 Array3d<T>
const * tp(array_);
4718 return tp->plane_col_rend(P,plane_coordinate,col);
4724 template<
typename T>
4726 typename Matrix3d<T>::const_iterator1d
4728 const size_type row,
const Box2d<int> & b)
const
4730 Array3d<T>
const * tp(array_);
4731 return tp->plane_row_begin(P,plane_coordinate,row,b);
4734 template<
typename T>
4736 typename Matrix3d<T>::iterator1d
4738 const size_type row,
const Box2d<int> & b)
4740 return array_->plane_row_begin(P,plane_coordinate,row,b);
4743 template<
typename T>
4745 typename Matrix3d<T>::iterator1d
4747 const size_type row,
const Box2d<int> & b)
4749 return array_->plane_row_end(P,plane_coordinate,row,b);
4752 template<
typename T>
4754 typename Matrix3d<T>::const_iterator1d
4756 const size_type row,
const Box2d<int> & b)
const
4758 Array3d<T>
const * tp(array_);
4759 return tp->plane_row_end(P,plane_coordinate,row,b);
4762 template<
typename T>
4764 typename Matrix3d<T>::reverse_iterator1d
4766 const size_type row,
const Box2d<int> & b)
4768 return array_->plane_row_rbegin(P,plane_coordinate,row,b);
4771 template<
typename T>
4773 typename Matrix3d<T>::const_reverse_iterator1d
4775 const size_type row,
const Box2d<int> & b)
const
4777 Array3d<T>
const * tp(array_);
4778 return tp->plane_row_rbegin(P,plane_coordinate,row,b);
4781 template<
typename T>
4783 typename Matrix3d<T>::reverse_iterator1d
4785 const size_type row,
const Box2d<int> & b)
4787 return array_->plane_row_rend(P,plane_coordinate,row,b);
4790 template<
typename T>
4792 typename Matrix3d<T>::const_reverse_iterator1d
4794 const size_type row,
const Box2d<int> & b)
const
4796 Array3d<T>
const * tp(array_);
4797 return tp->plane_row_rend(P,plane_coordinate,row,b);
4800 template<
typename T>
4802 typename Matrix3d<T>::iterator1d
4804 const size_type col,
const Box2d<int> & b)
4806 return array_->plane_col_begin(P,plane_coordinate,col,b);
4809 template<
typename T>
4811 typename Matrix3d<T>::const_iterator1d
4813 const size_type col,
const Box2d<int> & b)
const
4815 Array3d<T>
const * tp(array_);
4816 return tp->plane_col_begin(P,plane_coordinate,col,b);
4819 template<
typename T>
4821 typename Matrix3d<T>::iterator1d
4823 const size_type col,
const Box2d<int> & b)
4825 return array_->plane_col_end(P,plane_coordinate,col,b);
4828 template<
typename T>
4830 typename Matrix3d<T>::const_iterator1d
4832 const size_type col,
const Box2d<int> & b)
const
4834 Array3d<T>
const * tp(array_);
4835 return tp->plane_col_end(P,plane_coordinate,col,b);
4838 template<
typename T>
4840 typename Matrix3d<T>::reverse_iterator1d
4842 const size_type col,
const Box2d<int> & b)
4844 return array_->plane_col_rbegin(P,plane_coordinate,col,b);
4847 template<
typename T>
4849 typename Matrix3d<T>::const_reverse_iterator1d
4851 const size_type col,
const Box2d<int> & b)
const
4853 Array3d<T>
const * tp(array_);
4854 return tp->plane_col_rbegin(P,plane_coordinate,col,b);
4857 template<
typename T>
4859 typename Matrix3d<T>::reverse_iterator1d
4861 const size_type col,
const Box2d<int> & b)
4863 return array_->plane_col_rend(P,plane_coordinate,col,b);
4866 template<
typename T>
4868 typename Matrix3d<T>::const_reverse_iterator1d
4870 const size_type col,
const Box2d<int> & b)
const
4872 Array3d<T>
const * tp(array_);
4873 return tp->plane_col_rend(P,plane_coordinate,col,b);
4875 #endif //ALL_PLANE_ITERATOR3D
4883 template<
typename T>
4888 return array_->plane_upper_left(P,plane_coordinate);
4891 template<
typename T>
4896 return array_->plane_bottom_right(P,plane_coordinate);
4899 template<
typename T>
4904 Array3d<T>
const * tp(array_);
4905 return tp->plane_upper_left(P,plane_coordinate);
4908 template<
typename T>
4913 Array3d<T>
const * tp(array_);
4914 return tp->plane_bottom_right(P,plane_coordinate);
4917 template<
typename T>
4922 return array_->plane_rupper_left(P,plane_coordinate);
4925 template<
typename T>
4930 return array_->plane_rbottom_right(P,plane_coordinate);
4933 template<
typename T>
4938 Array3d<T>
const * tp(array_);
4939 return tp->plane_rupper_left(P,plane_coordinate);
4942 template<
typename T>
4947 Array3d<T>
const * tp(array_);
4948 return tp->plane_rbottom_right(P,plane_coordinate);
4953 template<
typename T>
4961 template<
typename T>
4969 template<
typename T>
4978 template<
typename T>
4987 template<
typename T>
4995 template<
typename T>
5003 template<
typename T>
5012 template<
typename T>
5028 template<
typename T>
5035 template<
typename T>
5043 template<
typename T>
5050 template<
typename T>
5058 template<
typename T>
5066 template<
typename T>
5075 template<
typename T>
5083 template<
typename T>
5094 template<
typename T>
5101 template<
typename T>
5110 template<
typename T>
5118 template<
typename T>
5127 template<
typename T>
5135 template<
typename T>
5144 template<
typename T>
5152 template<
typename T>
5163 template<
typename T>
5173 template<
typename T>
5184 template<
typename T>
5196 template<
typename T>
5207 template<
typename T>
5217 template<
typename T>
5228 template<
typename T>
5238 template<
typename T>
5256 template <
typename T>
5258 std::ostream& operator<<(std::ostream & out, const Matrix3d<T>& a)
5270 template<
typename T>
5275 return (*array_)[k];
5278 template<
typename T>
5283 return (*array_)[k];
5286 template<
typename T>
5293 return (*array_)[k][i][j];
5296 template<
typename T>
5303 return (*array_)[k][i][j];
5308 template<
typename T>
5314 template<
typename T>
5319 template<
typename T>
5324 template<
typename T>
5329 template<
typename T>
5334 template<
typename T>
5339 template<
typename T>
5344 template<
typename T>
5350 template<
typename T>
5355 template<
typename T>
5361 template<
typename T>
5366 template<
typename T>
5370 template<
typename T>
5374 array_->
swap(*(M.array_));
5383 template<
typename T>
5392 template<
typename T>
5404 template<
typename T>
5406 bool operator<(const Matrix3d<T>& x,
5409 return std::lexicographical_compare(x.begin(), x.end(),
5410 y.begin(), y.end());
5414 template<
typename T>
5422 template<
typename T>
5424 bool operator<=(const Matrix3d<T>& x,
5430 template<
typename T>
5445 template<
typename T>
5449 std::transform(array_->begin(),array_->end(),array_->begin(),std::bind2nd(std::plus<T>(),val));
5453 template<
typename T>
5457 std::transform(array_->begin(),array_->end(),array_->begin(),std::bind2nd(std::minus<T>(),val));
5461 template<
typename T>
5465 std::transform(array_->begin(),array_->end(),array_->begin(),std::bind2nd(std::multiplies<T>(),val));
5469 template<
typename T>
5473 std::transform(array_->begin(),array_->end(),array_->begin(),std::bind2nd(std::divides<T>(),val));
5477 template<
typename T>
5482 std::transform(array_->begin(),array_->end(),tmp.
begin(),std::negate<T>());
5486 template<
typename T>
5490 assert(this->dim1() == rhs.
dim1());
5491 assert(this->dim2() == rhs.
dim2());
5492 assert(this->dim3() == rhs.
dim3());
5494 std::transform(array_->begin(),array_->end(),(*(rhs.array_)).begin(),array_->begin(),std::plus<T>());
5498 template<
typename T>
5502 assert(this->dim1() == rhs.
dim1());
5503 assert(this->dim2() == rhs.
dim2());
5504 assert(this->dim3() == rhs.
dim3());
5505 std::transform(array_->begin(),array_->end(),(*(rhs.array_)).begin(),array_->begin(),std::minus<T>());
5509 template<
typename T>
5513 assert(this->dim1() == rhs.
dim1());
5514 assert(this->dim2() == rhs.
dim2());
5515 assert(this->dim3() == rhs.
dim3());
5516 std::transform(array_->begin(),array_->end(),(*(rhs.array_)).begin(),array_->begin(),std::multiplies<T>());
5520 template<
typename T>
5524 assert(this->size() == rhs.
size());
5525 std::transform(array_->begin(),array_->end(),(*(rhs.array_)).begin(),array_->begin(),std::divides<T>());
5531 template<
typename T>
5535 assert(array_->size() != 0);
5536 return *std::min_element(array_->begin(),array_->end());
5539 template<
typename T>
5543 assert(array_->size() != 0);
5544 return *std::max_element(array_->begin(),array_->end());
5547 template<
typename T>
5551 assert(array_->size() != 0);
5552 return std::accumulate(array_->begin(),array_->end(),T());
5556 template<
typename T>
5560 slip::apply(this->begin(),this->end(),this->begin(),fun);
5564 template<
typename T>
5568 slip::apply(this->begin(),this->end(),this->begin(),fun);
5575 template<
typename T>
5585 std::transform(M1.
begin(),M1.
end(),M2.
begin(),tmp.begin(),std::plus<T>());
5589 template<
typename T>
5599 template<
typename T>
5608 template<
typename T>
5618 std::transform(M1.
begin(),M1.
end(),M2.
begin(),tmp.begin(),std::minus<T>());
5622 template<
typename T>
5632 template<
typename T>
5640 template<
typename T>
5650 std::transform(M1.
begin(),M1.
end(),M2.
begin(),tmp.begin(),std::multiplies<T>());
5654 template<
typename T>
5664 template<
typename T>
5672 template<
typename T>
5682 std::transform(M1.
begin(),M1.
end(),M2.
begin(),tmp.begin(),std::divides<T>());
5686 template<
typename T>
5698 template<
typename T>
5705 template<
typename T>
5712 template<
typename T>
5722 template<
typename T>
5731 template<
typename T>
5740 template<
typename T>
5749 template<
typename T>
5758 template<
typename T>
5767 template<
typename T>
5776 template<
typename T>
5785 template<
typename T>
5794 template<
typename T>
5803 template<
typename T>
5812 template<
typename T>
5821 template<
typename T>
5830 template<
typename T>
5842 #endif //SLIP_MATRIX3D_HPP
size_type dim2() const
Returns the number of rows (second dimension size) in the Matrix3d.
HyperVolume< T > tanh(const HyperVolume< T > &M)
bool operator!=(const Array< T > &x, const Array< T > &y)
Matrix3d< T > asin(const Matrix3d< T > &M)
This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d...
iterator2d plane_bottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write iterator that points to the last element of the plane in the Array3d...
std::reverse_iterator< const_col_range_iterator > const_reverse_col_range_iterator
reverse_iterator plane_rbegin(const size_type slice)
Returns a read/write reverse iterator that points to the last element in the slice plane of the Matri...
size_type slices() const
Returns the number of slices (first dimension size) in the Matrix3d.
T & max(const GrayscaleImage< T > &M1)
Returns the max element of a GrayscaleImage.
value_type const & const_reference
Matrix3d< T > cos(const Matrix3d< T > &M)
reverse_iterator rbegin()
Returns a read/write reverse iterator that points to the last element in the Matrix3d. Iteration is done in reverse element order.
reverse_slice_iterator slice_rend(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 (row...
bool operator>=(const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
Matrix3d< T > atan(const Matrix3d< T > &M)
value_type const * const_pointer
static const std::size_t DIM
iterator3d front_upper_left()
Returns a read/write iterator3d that points to the first element of the Array3d. It points to the fro...
std::reverse_iterator< row_range_iterator > reverse_row_range_iterator
self & operator+=(const T &val)
Add val to each element of the Matrix.
slip::Matrix3d< double > Matrix3d_d
double alias
ptrdiff_t difference_type
T & min(const Matrix3d< T > &M1)
slip::stride_iterator< pointer > row_range_iterator
reverse_iterator3d rback_bottom_right()
Returns a read/write reverse iterator3d. It points to past the front upper left element of the Array3...
HyperVolume< T > abs(const HyperVolume< T > &V)
Returns the abs value of each element of the HyperVolume.
std::reverse_iterator< iterator2d > reverse_iterator2d
size_type dim1() const
Returns the number of slices (first dimension size) in the Matrix3d.
Matrix3d< T > abs(const Matrix3d< T > &M)
std::reverse_iterator< iterator > reverse_iterator
Matrix3d< T > tan(const Matrix3d< T > &M)
slip::Matrix3d< unsigned long > Matrix3d_ul
unsigned long alias
size_type dim3() const
Returns the number of columns (third dimension size) in the Matrix3d.
This is a three-dimensional dynamic and generic container. This container statisfies the Bidirectionn...
This is some iterator to iterate a 3d container into two Range defined by the indices and strides of ...
HyperVolume< T > cosh(const HyperVolume< T > &M)
const_iterator begin() const
Returns a read-only (constant) iterator that points to the first element in the Array3d. Iteration is done in ordinary element order.
const Matrix3d< T > const_self
void swap(Matrix3d &M)
Swaps data with another Matrix3d.
slice_iterator slice_end(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 (row...
T & min(const GrayscaleImage< T > &M1)
Returns the min element of a GrayscaleImage.
std::reverse_iterator< const_iterator3d_range > const_reverse_iterator3d_range
size_type size() const
Returns the number of elements in the Matrix3d.
Matrix3d< T > exp(const Matrix3d< T > &M)
col_iterator col_begin(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...
slip::stride_iterator< const_pointer > const_row_range_iterator
self & operator*=(const T &val)
reverse_iterator2d plane_rupper_left(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write reverse_iterator that points to the bottom right element of the plane in the Mat...
Matrix3d< T > tanh(const Matrix3d< T > &M)
Color< T > operator+(const Color< T > &V1, const Color< T > &V2)
reverse_row_iterator row_rbegin(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...
slip::Array3d< T >::const_iterator3d const_iterator3d
T & max() const
Returns the max element of the Matrix according to the operator <.
slip::Array3d< T >::const_iterator3d_range const_iterator3d_range
slip::stride_iterator< const_pointer > const_col_iterator
const_iterator3d const_default_iterator
slip::stride_iterator< slice_iterator > slice_range_iterator
HyperVolume< T > atan(const HyperVolume< T > &M)
reverse_col_iterator col_rend(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...
HyperVolume< T > sin(const HyperVolume< T > &V)
Returns the sin value of each element of the HyperVolume.
size_type rows() const
Returns the number of rows (second dimension size) in the Matrix3d.
std::reverse_iterator< iterator3d_range > reverse_iterator3d_range
size_type slice_size() const
Returns the number of elements in a slice of the Matrix3d.
Matrix3d< T > cosh(const Matrix3d< T > &M)
const_iterator begin() const
Returns a read-only (constant) iterator that points to the first element in the Matrix3d. Iteration is done in ordinary element order.
HyperVolume< T > exp(const HyperVolume< T > &M)
HyperVolume< T > sinh(const HyperVolume< T > &V)
Returns the sinh value of each element of the HyperVolume.
std::reverse_iterator< const_slice_range_iterator > const_reverse_slice_range_iterator
reverse_slice_iterator slice_rbegin(const size_type row, const size_type col)
Returns a read/write iterator that points to the last element of the line (row,col) threw the slices ...
void fill(const T *value)
Fills the container range [begin(),begin()+size()) with a copy of the value array.
PLANE_ORIENTATION
Choose between different plane orientations.
reverse_col_iterator col_rbegin(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< const_iterator > const_reverse_row_iterator
HyperVolume< T > abs(const HyperVolume< T > &M)
bool operator>(const Array< T > &x, const Array< T > &y)
Provides a class to manipulate iterator3d within a slip::Range. It is used to iterate throw 3d contai...
HyperVolume< T > sin(const HyperVolume< T > &M)
reverse_iterator rend()
Returns a read/write reverse iterator that points to one before the first element in the Matrix3d...
HyperVolume< T > tan(const HyperVolume< T > &V)
Returns the tan value of each element of the HyperVolume.
HyperVolume< T > cos(const HyperVolume< T > &M)
reverse_iterator2d plane_rbottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write reverse_iterator that points to the upper left element of the plane in the Matri...
HyperVolume< T > log10(const HyperVolume< T > &V)
Returns the log10 value of each element of the HyperVolume.
std::reverse_iterator< const_col_iterator > const_reverse_col_iterator
Matrix3d< T > sqrt(const Matrix3d< T > &M)
iterator end()
Returns a read/write iterator that points one past the last element in the Array3d. Iteration is done in ordinary element order.
reverse_iterator2d plane_rupper_left(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write reverse_iterator that points to the bottom right element of the plane in the Arr...
MultivariatePolynomial< T, DIM > operator*(const MultivariatePolynomial< T, DIM > &P1, const MultivariatePolynomial< T, DIM > &P2)
pointwise multiplication of two MultivariatePolynomial
row_iterator row_begin(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 in t...
slip::Matrix3d< int > Matrix3d_i
int alias
reverse_iterator3d rfront_upper_left()
Returns a read/write reverse iterator3d. It points to the back bottom right element of the Array3d...
void resize(std::size_t d1, std::size_t d2, std::size_t d3, const T &val=T())
Resizes a Matrix3d.
std::reverse_iterator< iterator3d > reverse_iterator3d
Matrix3d< T > sin(const Matrix3d< T > &M)
HyperVolume< T > asin(const HyperVolume< T > &V)
Returns the sin value of each element of the HyperVolume.
std::reverse_iterator< slice_iterator > reverse_slice_iterator
std::reverse_iterator< const_slice_iterator > const_reverse_slice_iterator
Matrix3d< T > operator-(const T &val, const Matrix3d< T > &M1)
substraction of a scalar to each element of a Matrix3d
self & operator/=(const T &val)
slip::stride_iterator< pointer > slice_iterator
slip::Array3d< T >::iterator3d iterator3d
reverse_iterator3d rfront_upper_left()
Returns a read/write reverse iterator3d. It points to the back bottom right element of the Matrix3d...
T sum() const
Returns the sum of the elements of the Matrix.
reverse_row_iterator row_rend(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...
Matrix3d< T > & apply(T(*fun)(T))
Applys the one-parameter C-function fun to each element of the Matrix3d.
void copy(_II first, _II last, _OI output_first)
Copy algorithm optimized for slip iterators.
slice_iterator slice_begin(const size_type row, const size_type col)
Returns a read/write iterator that points to the first element of the line (row,col) threw the slices...
std::reverse_iterator< const_iterator3d > const_reverse_iterator3d
iterator plane_begin(const size_type slice)
Returns a read/write iterator that points to the first element in the in the slice plane of the Matri...
Provides a class to manipulate iterator2d within a slip::Box3d. It is used to iterate throw 3d contai...
MultivariatePolynomial< T, DIM > operator-(const MultivariatePolynomial< T, DIM > &P1, const MultivariatePolynomial< T, DIM > &P2)
pointwise substraction of two MultivariatePolynomial
slip::stride_iterator< const_col_iterator > const_col_range_iterator
Matrix3d< T > log10(const Matrix3d< T > &M)
col_iterator col_end(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...
iterator2d plane_bottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write iterator that points to the last element of the plane in the Matrix3d...
T & max(const Matrix3d< T > &M1)
T & min(const GrayscaleImage< T > &M1)
Returns the min element of a GrayscaleImage.
HyperVolume< T > sqrt(const HyperVolume< T > &M)
std::reverse_iterator< slice_range_iterator > reverse_slice_range_iterator
reverse_iterator3d rback_bottom_right()
Returns a read/write reverse iterator3d. It points to past the front upper left element of the Matrix...
HyperVolume< T > cos(const HyperVolume< T > &V)
Returns the cos value of each element of the HyperVolume.
iterator plane_end(const size_type slice)
Returns a read/write iterator that points one past the last element in the slice plane of the Matrix3...
HyperVolume< T > sinh(const HyperVolume< T > &M)
reverse_iterator2d plane_rbottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write reverse_iterator that points to the upper left element of the plane in the Array...
std::reverse_iterator< col_range_iterator > reverse_col_range_iterator
row_iterator row_end(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...
MultivariatePolynomial< T, DIM > operator/(const MultivariatePolynomial< T, DIM > &P, const T &val)
division of a scalar to each element of a MultivariatePolynomial
slip::Array3d< T >::iterator3d_range iterator3d_range
size_type columns() const
Returns the number of columns (third dimension size) in the Matrix3d.
Provides a class to iterate 3d containers throw a planes.
slip::stride_iterator< const_slice_iterator > const_slice_range_iterator
const_pointer const_row_iterator
This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d c...
slip::Matrix3d< char > Matrix3d_c
char alias
slip::Array3d< T >::iterator2d iterator2d
self & operator-=(const T &val)
iterator2d plane_upper_left(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write iterator that points to the first element of the plane in the Array3d...
std::reverse_iterator< col_iterator > reverse_col_iterator
slip::Matrix3d< float > Matrix3d_f
float alias
iterator3d back_bottom_right()
Returns a read/write iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Array3d.
iterator3d default_iterator
HyperVolume< T > tanh(const HyperVolume< T > &V)
Returns the tanh value of each element of the HyperVolume.
HyperVolume< T > atan(const HyperVolume< T > &V)
Returns the atan value of each element of the HyperVolume.
Matrix3d(const size_type d1, const size_type d2, const size_type d3, InputIterator first, InputIterator last)
Contructs a Matrix3d from a range.
std::string name() const
Returns the name of the class.
bool operator!=(const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
slip::Matrix3d< unsigned char > Matrix3d_uc
unsigned char alias
std::reverse_iterator< iterator > reverse_row_iterator
HyperVolume< T > log(const HyperVolume< T > &M)
slip::Matrix3d< long > Matrix3d_l
long alias
HyperVolume< T > acos(const HyperVolume< T > &V)
Returns the acos value of each element of the HyperVolume.
slip::Array3d< T >::const_iterator2d const_iterator2d
size_type cols() const
Returns the number of columns (third dimension size) in the Matrix3d.
HyperVolume< T > cosh(const HyperVolume< T > &V)
Returns the cosh value of each element of the HyperVolume.
Matrix3d()
Constructs a Matrix3d.
void fill(InputIterator first, InputIterator last)
Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)
bool empty() const
Returns true if the Matrix3d is empty. (Thus size() == 0)
This is some iterator to iterate a 3d container into two Range defined by the indices and strides of ...
bool operator>(const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
slip::stride_iterator< const_pointer > const_slice_iterator
HyperVolume< T > acos(const HyperVolume< T > &M)
reverse_iterator plane_rend(const size_type slice)
Returns a read/write reverse iterator that points to one before the first element in the slice plane ...
HyperVolume< T > log10(const HyperVolume< T > &M)
Provides a class to manipulate 3d dynamic and generic arrays.
size_type max_size() const
Returns the maximal size (number of elements) in the Matrix3d.
std::reverse_iterator< const_iterator > const_reverse_iterator
HyperVolume< T > sqrt(const HyperVolume< T > &V)
Returns the sqrt value of each element of the HyperVolume.
This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d...
Provides some algorithms to apply C like functions to ranges.
bool operator==(const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
slip::Matrix3d< unsigned short > Matrix3d_us
unsigned long alias
void fill(const T &value)
Fills the container range [begin(),begin()+size()) with copies of value.
iterator2d plane_upper_left(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write iterator that points to the first element of the plane in the Matrix3d...
Provides a class to iterate a 1d range according to a step.
slip::Matrix3d< unsigned int > Matrix3d_ui
unsigned int alias
~Matrix3d()
Destructor of the Matrix3d.
HyperVolume< T > tan(const HyperVolume< T > &M)
slip::stride_iterator< pointer > col_iterator
slip::Matrix3d< short > Matrix3d_s
short alias
const_pointer const_iterator
bool operator==(const Array< T > &x, const Array< T > &y)
HyperVolume< T > asin(const HyperVolume< T > &M)
std::reverse_iterator< const_iterator2d > const_reverse_iterator2d
Matrix3d< T > acos(const Matrix3d< T > &M)
Matrix3d< T > log(const Matrix3d< T > &M)
HyperVolume< T > log(const HyperVolume< T > &V)
Returns the log value of each element of the HyperVolume.
T ** operator[](const size_type k)
Subscript access to the slice datas contained in the GenericMultiComponent3d.
MultivariatePolynomial< T, DIM > operator+(const MultivariatePolynomial< T, DIM > &P1, const MultivariatePolynomial< T, DIM > &P2)
pointwise addition of two MultivariatePolynomial
Color< T > operator*(const Color< T > &V1, const Color< T > &V2)
iterator end()
Returns a read/write iterator that points one past the last element in the Matrix3d. Iteration is done in ordinary element order.
std::reverse_iterator< const_row_range_iterator > const_reverse_row_range_iterator
T & min() const
Returns the min element of the Matrix according to the operator <.
slip::stride_iterator< col_iterator > col_range_iterator
reference operator()(const size_type k, const size_type i, const size_type j)
Subscript access to the data contained in the Matrix3d.
void apply(InputIterator first, InputIterator last, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(typename std::iterator_traits< InputIterator >::value_type))
Applies a C-function to each element of a range.
T & max(const GrayscaleImage< T > &M1)
Returns the max element of a GrayscaleImage.
Color< T > operator/(const Color< T > &V1, const Color< T > &V2)
Matrix3d< T > sinh(const Matrix3d< T > &M)
iterator3d front_upper_left()
Returns a read/write iterator3d that points to the first element of the Matrix3d. It points to the fr...
iterator3d back_bottom_right()
Returns a read/write iterator3d that points to the past the end element of the Matrix3d. It points to past the end element of the back bottom right element of the Matrix3d.
bool operator>=(const Array< T > &x, const Array< T > &y)
Color< T > operator-(const Color< T > &V1, const Color< T > &V2)
self & operator=(const Matrix3d< T > &rhs)
Assign a Matrix3d.
HyperVolume< T > exp(const HyperVolume< T > &V)
Returns the exp value of each element of the HyperVolume.
This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d c...