#include <box.hh>
Public Types | |
enum | { dim = P::dim } |
Dimension. More... | |
typedef box_bkd_piter_< P > | bkd_piter |
Backward Site_Iterator associated type. | |
typedef Site_Set< void > | category |
typedef P | element |
Element associated type. | |
typedef E | exact_t |
typedef box_fwd_piter_< P > | fwd_piter |
Forward Site_Iterator associated type. | |
typedef fwd_piter | piter |
Site_Iterator associated type. | |
typedef P | psite |
Psite associated type. | |
typedef const E & | q_box |
typedef P | site |
Site associated type. | |
Public Member Functions | |
const E & | bbox () const |
Give the bounding box of this site set. | |
box (const site &pmin, const site &pmax) | |
Constructor of a box going from pmin to pmax . | |
box () | |
Constructor without argument. | |
P | center () const |
Return the approximated central site of this box. | |
void | crop_wrt (const box< P > &b) |
Crop this bbox in order to fit in the reference box b . | |
void | enlarge (unsigned dim, unsigned b) |
Enlarge the box with a border b for dimension dim . | |
void | enlarge (unsigned b) |
Enlarge the box with a border b . | |
bool | has (const P &p) const |
Test if p belongs to the box. | |
bool | is_empty () const |
Test if this box is empty. | |
bool | is_valid () const |
Test that the box owns valid data, i.e., is initialized and with pmin being 'less-than' pmax. | |
unsigned | len (unsigned i) const |
Give the length of the i-th side of the box. | |
std::size_t | memory_size () const |
Return the size of this site set in memory. | |
unsigned | nsites () const |
Give the number of sites of this box. | |
P & | pmax () |
Reference to the maximum point. | |
P | pmax () const |
Maximum point. | |
P & | pmin () |
Reference to the minimum point. | |
P | pmin () const |
Minimum point. | |
box< P > | to_larger (unsigned b) const |
Give a larger box. | |
box (typename P::coord nslis, typename P::coord nrows, typename P::coord ncols) | |
box (typename P::coord nrows, typename P::coord ncols) | |
box (typename P::coord ninds) | |
Protected Attributes | |
P | pmax_ |
P | pmin_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename Sl, typename Sr> | |
p_set< typename Sl::site > | diff (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs) |
Set theoretic difference of lhs and rhs . | |
template<typename Sl, typename Sr> | |
p_set< typename Sl::site > | inter (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs) |
Intersection between a couple of point sets. | |
template<typename Sl, typename Sr> | |
bool | operator< (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs) |
Strict inclusion test between site sets lhs and rhs . | |
template<typename Bl, typename Br> | |
bool | operator< (const Box< Bl > &lhs, const Box< Br > &rhs) |
Strict inclusion test between boxes lhs and rhs . | |
template<typename S> | |
std::ostream & | operator<< (std::ostream &ostr, const Site_Set< S > &set) |
Print a site set set into the output stream ostr . | |
template<typename P> | |
std::ostream & | operator<< (std::ostream &ostr, const box< P > &b) |
Print a generic box b into the output stream ostr . | |
template<typename Sl, typename Sr> | |
bool | operator<= (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs) |
Inclusion test between site sets lhs and rhs . | |
template<typename Bl, typename Br> | |
bool | operator<= (const Box< Bl > &lhs, const Box< Br > &rhs) |
Inclusion test between boxes lhs and rhs . | |
template<typename Sl, typename Sr> | |
bool | operator== (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs) |
Equality test between site sets lhs and rhs . | |
template<typename Sl, typename Sr> | |
p_set< typename Sl::site > | sym_diff (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs) |
Set theoretic symmetrical difference of lhs and rhs . | |
template<typename Sl, typename Sr> | |
p_set< typename Sl::site > | uni (const Site_Set< Sl > &lhs, const Site_Set< Sr > &rhs) |
Union of a couple of point sets. | |
template<typename S> | |
p_set< typename S::site > | unique (const Site_Set< S > &s) |
Give the unique set of s . |
Parameter P
is the corresponding type of point.
Definition at line 80 of file core/site_set/box.hh.
typedef box_bkd_piter_<P> mln::box< P >::bkd_piter |
typedef Site_Set<void> mln::Site_Set< E >::category [inherited] |
typedef E mln::Object< E >::exact_t [inherited] |
typedef box_fwd_piter_<P> mln::box< P >::fwd_piter |
Definition at line 64 of file core/concept/box.hh.
anonymous enum |
Constructor of a box going from pmin
to pmax
.
Definition at line 258 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
Constructors with different numbers of arguments (sizes) w.r.t. the dimension.
Definition at line 267 of file core/site_set/box.hh.
References mln::literal::origin, mln::box< P >::pmax_, and mln::box< P >::pmin_.
mln::box< P >::box | ( | typename P::coord | nrows, | |
typename P::coord | ncols | |||
) | [inline] |
Definition at line 276 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::literal::origin, mln::box< P >::pmax_, and mln::box< P >::pmin_.
mln::box< P >::box | ( | typename P::coord | nslis, | |
typename P::coord | nrows, | |||
typename P::coord | ncols | |||
) | [inline] |
Definition at line 288 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::literal::origin, mln::box< P >::pmax_, and mln::box< P >::pmin_.
const E & mln::Box< E >::bbox | ( | ) | const [inline, inherited] |
Give the bounding box of this site set.
Return the bounding box of this site set, so that is itself. This method is declared by the mln::Site_Set concept.
Definition at line 124 of file core/concept/box.hh.
References mln::exact().
P mln::box< P >::center | ( | ) | const [inline] |
Return the approximated central site of this box.
Definition at line 369 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::box< P >::pmax_, and mln::box< P >::pmin_.
Crop this bbox in order to fit in the reference box b
.
Definition at line 200 of file core/site_set/box.hh.
References mln::box< P >::pmax(), mln::box< P >::pmax_, mln::box< P >::pmin(), and mln::box< P >::pmin_.
Referenced by mln::make_debug_graph_image().
void mln::box< P >::enlarge | ( | unsigned | dim, | |
unsigned | b | |||
) | [inline] |
Enlarge the box with a border b
for dimension dim
.
Definition at line 325 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::box< P >::pmax_, and mln::box< P >::pmin_.
void mln::box< P >::enlarge | ( | unsigned | b | ) | [inline] |
Enlarge the box with a border b
.
Definition at line 311 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::box< P >::pmax_, and mln::box< P >::pmin_.
Referenced by mln::registration::closest_point_with_map< P >::closest_point_with_map(), and mln::registration::icp().
bool mln::box< P >::has | ( | const P & | p | ) | const [inline] |
Test if p
belongs to the box.
[in] | p | A point site. |
Definition at line 299 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::box< P >::pmax_, and mln::box< P >::pmin_.
Referenced by mln::morpho::line_gradient(), my_box2d::operator()(), f_box3d_t::operator()(), f_box2d_t::operator()(), and f_box1d_t::operator()().
bool mln::Box< E >::is_empty | ( | ) | const [inline, inherited] |
Test if this box is empty.
Definition at line 167 of file core/concept/box.hh.
References mln::exact().
bool mln::box< P >::is_valid | ( | ) | const [inline] |
Test that the box owns valid data, i.e., is initialized and with pmin being 'less-than' pmax.
Definition at line 190 of file core/site_set/box.hh.
References mln::util::ord_weak(), mln::box< P >::pmax_, and mln::box< P >::pmin_.
Referenced by mln::box< P >::box(), mln::box< P >::center(), mln::registration::closest_point_with_map< P >::closest_point_with_map(), mln::transform::distance_and_closest_point_geodesic(), mln::box< P >::enlarge(), mln::box< P >::has(), mln::p_line2d::is_valid(), mln::box< P >::pmax(), mln::box< P >::pmin(), mln::accu::shape::bbox< P >::take(), and mln::box< P >::to_larger().
unsigned mln::Box< E >::len | ( | unsigned | i | ) | const [inline, inherited] |
Give the length of the i-th
side of the box.
Definition at line 131 of file core/concept/box.hh.
References mln::exact().
Referenced by mln::fun::p2p::internal::do_fold_helper< 3, fold< P, dir_0, dir_1, dir_2 > >::run(), mln::fun::p2p::internal::do_fold_helper< 2, fold< P, dir_0, dir_1,-1 > >::run(), and mln::fun::p2p::internal::do_fold_helper< 1, fold< P,-1,-1,-1 > >::run().
std::size_t mln::box< P >::memory_size | ( | ) | const [inline] |
unsigned mln::Box< E >::nsites | ( | ) | const [inline, inherited] |
Give the number of sites of this box.
Return the number of sites of this box. This method is declared by the mln::Site_Set concept.
Definition at line 153 of file core/concept/box.hh.
References mln::exact().
Referenced by mln::morpho::line_gradient().
P & mln::box< P >::pmax | ( | ) | [inline] |
Reference to the maximum point.
Definition at line 242 of file core/site_set/box.hh.
References mln::box< P >::pmax_.
P mln::box< P >::pmax | ( | ) | const [inline] |
Maximum point.
Definition at line 233 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), and mln::box< P >::pmax_.
Referenced by make::complex1d_image(), mln::p_line2d::compute_(), mln::box< P >::crop_wrt(), mln::world::inter_pixel::display_edge(), mln::hexa_fwd_piter_< S >::hexa_fwd_piter_(), mln::make::image3d(), mln::hexa< I >::init_(), mln::larger_than(), mln::io::fld::load(), mln::io::fld::internal::make_header(), mln::io::plot::save(), mln::accu::shape::bbox< P >::take(), and convert::to_image2d().
P & mln::box< P >::pmin | ( | ) | [inline] |
Reference to the minimum point.
Definition at line 225 of file core/site_set/box.hh.
References mln::box< P >::pmin_.
P mln::box< P >::pmin | ( | ) | const [inline] |
Minimum point.
Definition at line 216 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), and mln::box< P >::pmin_.
Referenced by make::complex1d_image(), mln::p_line2d::compute_(), mln::box< P >::crop_wrt(), mln::world::inter_pixel::display_edge(), mln::hexa_fwd_piter_< S >::hexa_fwd_piter_(), mln::make::image3d(), mln::hexa< I >::init_(), mln::larger_than(), mln::io::fld::load(), mln::io::fld::internal::make_header(), mln::io::plot::save(), mln::accu::shape::bbox< P >::take(), and convert::to_image2d().
Give a larger box.
Definition at line 352 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::box< P >::pmax_, and mln::box< P >::pmin_.
bool operator< | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
bool operator< | ( | const Box< Bl > & | lhs, | |
const Box< Br > & | rhs | |||
) | [related, inherited] |
Strict inclusion test between boxes lhs
and rhs
.
Definition at line 193 of file core/concept/box.hh.
std::ostream & operator<< | ( | std::ostream & | ostr, | |
const Site_Set< S > & | set | |||
) | [related, inherited] |
std::ostream & operator<< | ( | std::ostream & | ostr, | |
const box< P > & | b | |||
) | [related] |
Print a generic box b
into the output stream ostr
.
[in,out] | ostr | An output stream. |
[in] | b | A generic box. |
ostr
.Definition at line 388 of file core/site_set/box.hh.
bool operator<= | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
bool operator<= | ( | const Box< Bl > & | lhs, | |
const Box< Br > & | rhs | |||
) | [related, inherited] |
bool operator== | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
Definition at line 160 of file core/site_set/box.hh.
Referenced by mln::box< P >::box(), mln::box< P >::center(), mln::box< P >::crop_wrt(), mln::box< P >::enlarge(), mln::box< P >::has(), mln::box< P >::is_valid(), mln::box< P >::pmax(), and mln::box< P >::to_larger().
Definition at line 160 of file core/site_set/box.hh.
Referenced by mln::box< P >::box(), mln::box< P >::center(), mln::box< P >::crop_wrt(), mln::box< P >::enlarge(), mln::box< P >::has(), mln::box< P >::is_valid(), mln::box< P >::pmin(), and mln::box< P >::to_larger().