#include <attributes.hh>
Inheritance diagram for oln::morpho::attr::box_type< I, Exact >:
Public Types | |
enum | { dim = point_traits<point_type>::dim } |
typedef box_type< I, Exact > | self_type |
Self type of the class. | |
typedef mlc::exact_vt< self_type, Exact >::ret | exact_type |
typedef oln::morpho::attr::attr_traits< exact_type >::value_type | value_type |
typedef oln::morpho::attr::attr_traits< exact_type >::env_type | env_type |
typedef oln::morpho::attr::attr_traits< exact_type >::lambda_type | lambda_type |
typedef oln::abstract::image< typename mlc::exact< I >::ret > | im_type |
Image type. | |
typedef mlc::exact< im_type >::ret::point_type | point_type |
Point type associated to im_type. | |
typedef mlc::exact< im_type >::ret::dpoint_type | dpoint_type |
Dpoint type associated to im_type. | |
Public Member Functions | |
box_type (const lambda_type &lambda) | |
Ctor from a lambda_type value. | |
box_type () | |
Basic Ctor. | |
box_type (const im_type &, const point_type &p, const env_type &) | |
Ctor from a point and an image. | |
value_type | getMin (int i) const |
Accessor to minimums. | |
value_type | getMax (int i) const |
Accessor to maximums. | |
value_type | getMin_impl (int i) const |
Accessor to minimums. | |
value_type | getMax_impl (int i) const |
Accessor to maximums. | |
void | pe_impl (const box_type &rhs) |
+= operator implementation. | |
bool | less_impl (const lambda_type &lambda) const |
"<" operator implementation. | |
bool | ne_impl (const lambda_type &lambda) const |
!= operator implementation. | |
Protected Attributes | |
std::vector< value_type > | maxs_ |
List of minimums. | |
std::vector< value_type > | mins_ |
List of maximums. |
I | Exact type of images to process. | |
Exact | The exact type. |
Definition at line 1582 of file morpho/attributes.hh.
oln::morpho::attr::box_type< I, Exact >::box_type | ( | const lambda_type & | lambda | ) | [inline] |
Ctor from a lambda_type value.
Definition at line 1598 of file morpho/attributes.hh.
References oln::morpho::attr::box_type< I, Exact >::maxs_, and oln::morpho::attr::box_type< I, Exact >::mins_.
01598 : maxs_(dim), mins_(dim) 01599 { 01600 for (int i = 0; i < dim; ++i) 01601 { 01602 mins_[i] = ntg_zero_val(value_type); 01603 maxs_[i] = lambda[i]; 01604 } 01605 };
oln::morpho::attr::box_type< I, Exact >::box_type | ( | ) | [inline] |
Basic Ctor.
Definition at line 1613 of file morpho/attributes.hh.
oln::morpho::attr::box_type< I, Exact >::box_type | ( | const im_type & | , | |
const point_type & | p, | |||
const env_type & | ||||
) | [inline] |
Ctor from a point and an image.
Definition at line 1622 of file morpho/attributes.hh.
References oln::morpho::attr::box_type< I, Exact >::maxs_, and oln::morpho::attr::box_type< I, Exact >::mins_.
01622 : maxs_(dim), mins_(dim) 01623 { 01624 for (int i = 0; i < dim; ++i) 01625 mins_[i] = maxs_[i] = p.nth(i); 01626 };
value_type oln::morpho::attr::box_type< I, Exact >::getMin | ( | int | i | ) | const [inline] |
Accessor to minimums.
Virtual method.
Definition at line 1636 of file morpho/attributes.hh.
Referenced by oln::morpho::attr::box_type< I, Exact >::pe_impl().
01637 { 01638 mlc_dispatch(getMin)(i); 01639 };
value_type oln::morpho::attr::box_type< I, Exact >::getMax | ( | int | i | ) | const [inline] |
Accessor to maximums.
Virtual method.
Definition at line 1650 of file morpho/attributes.hh.
Referenced by oln::morpho::attr::box_type< I, Exact >::pe_impl().
01651 { 01652 mlc_dispatch(getMax)(i); 01653 };
value_type oln::morpho::attr::box_type< I, Exact >::getMin_impl | ( | int | i | ) | const [inline] |
Accessor to minimums.
Virtual method.
Definition at line 1664 of file morpho/attributes.hh.
References oln::morpho::attr::box_type< I, Exact >::mins_.
01665 { 01666 precondition(i < point_traits<point_type>::dim); 01667 return mins_[i]; 01668 };
value_type oln::morpho::attr::box_type< I, Exact >::getMax_impl | ( | int | i | ) | const [inline] |
Accessor to maximums.
Virtual method.
Definition at line 1678 of file morpho/attributes.hh.
References oln::morpho::attr::box_type< I, Exact >::maxs_.
01679 { 01680 precondition(i < point_traits<point_type>::dim); 01681 return maxs_[i]; 01682 };
void oln::morpho::attr::box_type< I, Exact >::pe_impl | ( | const box_type< I, Exact > & | rhs | ) | [inline] |
+= operator implementation.
This is an implementation of the += operator. Override this method to provide a new implementation of this operator.
Definition at line 1691 of file morpho/attributes.hh.
References oln::morpho::attr::box_type< I, Exact >::getMax(), oln::morpho::attr::box_type< I, Exact >::getMin(), oln::morpho::attr::box_type< I, Exact >::maxs_, and oln::morpho::attr::box_type< I, Exact >::mins_.
01692 { 01693 for (int i = 0; i < dim; ++i) 01694 { 01695 mins_[i] = ntg::min(mins_[i], rhs.getMin(i)); 01696 maxs_[i] = ntg::max(maxs_[i], rhs.getMax(i)); 01697 } 01698 }
bool oln::morpho::attr::box_type< I, Exact >::less_impl | ( | const lambda_type & | lambda | ) | const [inline] |
"<" operator implementation.
This is an implementation of the += operator. Override this method to provide a new implementation of this operator.
Definition at line 1707 of file morpho/attributes.hh.
References oln::morpho::attr::box_type< I, Exact >::maxs_, and oln::morpho::attr::box_type< I, Exact >::mins_.
01708 { 01709 for (int i = 0; i < dim; ++i) 01710 if ((maxs_[i] - mins_[i]) >= lambda[i]) 01711 return false; 01712 return true; 01713 }
bool oln::morpho::attr::box_type< I, Exact >::ne_impl | ( | const lambda_type & | lambda | ) | const [inline] |
!= operator implementation.
This is an implementation of the += operator. Override this method to provide a new implementation of this operator.
Definition at line 1722 of file morpho/attributes.hh.
References oln::morpho::attr::box_type< I, Exact >::maxs_, and oln::morpho::attr::box_type< I, Exact >::mins_.
01723 { 01724 for (int i = 0; i < dim; ++i) 01725 if ((maxs_[i] - mins_[i]) == lambda[i]) 01726 return false; 01727 return true; 01728 };