$extrastylesheet
#include <mln/core/site_set/box.hh>
Public Member Functions | |
box () | |
box (const site &pmin, const site &pmax) | |
const box< P > & | bbox () const |
void | crop_wrt (const box< P > &b) |
void | enlarge (unsigned b) |
void | enlarge (unsigned dim, unsigned b) |
bool | has (const P &p) const |
bool | is_empty () const |
bool | is_valid () const |
unsigned | len (unsigned i) const |
std::size_t | memory_size () const |
void | merge (const box< P > &b) |
unsigned | nsites () const |
P | pcenter () const |
P | pmax () const |
P & | pmax () |
P | pmin () const |
P & | pmin () |
box< P > | to_larger (unsigned b) const |
box (typename P::coord ninds) | |
box (typename P::coord nrows, typename P::coord ncols) | |
box (typename P::coord nslis, typename P::coord nrows, typename P::coord ncols) |
Protected Attributes | |
P | pmax_ |
P | pmin_ |
Public Types | |
enum | { dim = P::dim } |
typedef box_bkd_piter_< P > | bkd_piter |
typedef Site_Set< void > | category |
typedef P | element |
typedef box< P > | exact_t |
typedef box_fwd_piter_< P > | fwd_piter |
typedef fwd_piter | piter |
typedef P | psite |
typedef const box< P > & | q_box |
typedef P | site |
Related Functions | |
(Note that these are not member functions.) | |
template<typename P > | |
box< P > | larger_than (const box< P > a, const box< P > b) |
template<typename P > | |
std::ostream & | operator<< (std::ostream &ostr, const box< P > &b) |
Generic box class: site set containing points of a regular grid.
Parameter P
is the corresponding type of point.
Definition at line 81 of file core/site_set/box.hh.
Constructor of a box going from pmin
to pmax
.
Constructors with different numbers of arguments (sizes) w.r.t. the dimension.
mln::box< P >::box | ( | typename P::coord | nslis, |
typename P::coord | nrows, | ||
typename P::coord | ncols | ||
) |
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.
Crop this bbox in order to fit in the reference box b
.
Enlarge the box with a border b
for dimension dim
.
Test if p
belongs to the box.
[in] | p | A point site. |
Test that the box owns valid data, i.e., is initialized and with pmin being 'less-than' pmax.
Give the length of the i-th
side of the box.
std::size_t mln::box< P >::memory_size | ( | ) | const |
Return the size of this site set in memory.
Merge inplace with another box.
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.
P mln::box< P >::pcenter | ( | ) | const |
Return the approximated central site of this box.
P mln::box< P >::pmax | ( | ) | const |
Maximum point.
P& mln::box< P >::pmax | ( | ) |
Reference to the maximum point.
P mln::box< P >::pmin | ( | ) | const |
Minimum point.
P& mln::box< P >::pmin | ( | ) |
Reference to the minimum point.
Return the minimum box including box a
and box b
.
|
related |
Print a generic box b
into the output stream ostr
.
[in,out] | ostr | An output stream. |
[in] | b | A generic box. |
ostr
.
|
protected |
Definition at line 165 of file core/site_set/box.hh.
|
protected |
Definition at line 165 of file core/site_set/box.hh.
typedef box_bkd_piter_<P> mln::box< P >::bkd_piter |
Backward Site_Iterator associated type.
Definition at line 105 of file core/site_set/box.hh.
|
inherited |
Definition at line 74 of file core/concept/site_set.hh.
Element associated type.
Definition at line 90 of file core/site_set/box.hh.
|
inherited |
typedef box_fwd_piter_<P> mln::box< P >::fwd_piter |
Forward Site_Iterator associated type.
Definition at line 99 of file core/site_set/box.hh.
Site_Iterator associated type.
Definition at line 102 of file core/site_set/box.hh.
Psite associated type.
Definition at line 93 of file core/site_set/box.hh.
Definition at line 64 of file core/concept/box.hh.
Site associated type.
Definition at line 96 of file core/site_set/box.hh.
anonymous enum |