#include <p_line2d.hh>
Public Types | |
typedef p_indexed_bkd_piter < self_ > | bkd_piter |
Backward Site_Iterator associated type. | |
typedef Site_Set< void > | category |
typedef point2d | element |
Element associated type. | |
typedef E | exact_t |
typedef p_indexed_fwd_piter < self_ > | fwd_piter |
Forward Site_Iterator associated type. | |
typedef p_indexed_fwd_piter < self_ > | piter |
Site_Iterator associated type. | |
typedef p_indexed_psite< self_ > | psite |
Psite associated type. | |
typedef const box2d & | q_box |
Box (qualified) associated type. | |
typedef subject< P >::ret | site |
Site associated type. | |
Public Member Functions | |
const box2d & | bbox () const |
Give the exact bounding box. | |
const point2d & | begin () const |
Give the point that begins the line. | |
const point2d & | end () const |
Give the point that ends the line. | |
bool | has (const util::index &i) const |
Test if index i belongs to this point set. | |
bool | has (const psite &p) const |
Test if p belongs to this point set. | |
bool | is_empty () const |
Test if the site set is empty. | |
bool | is_valid () const |
Test if this line is valid, i.e., initialized. | |
std::size_t | memory_size () const |
Return the size of this site set in memory. | |
unsigned | nsites () const |
Give the number of points. | |
const point2d & | operator[] (unsigned i) const |
Return the i-th point of the line. | |
p_line2d (const point2d &beg, const point2d &end, bool is_end_excluded=false) | |
Constructor from point beg to point end . | |
p_line2d () | |
Constructor without argument. | |
const std::vector< point2d > & | std_vector () const |
Return the corresponding std::vector of points. | |
algebra::vec< 2, float > | to_vec () const |
Protected Member Functions | |
void | compute_ (const point2d &beg, const point2d &end, bool is_end_excluded) |
Protected Attributes | |
p_array< point2d > | arr_ |
box2d | bb_ |
Private Types | |
typedef p_line2d | self_ |
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 S> | |
std::ostream & | operator<< (std::ostream &ostr, const Site_Set< S > &set) |
Print a site set set 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 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 . |
It is based on p_array.
Definition at line 79 of file p_line2d.hh.
typedef Site_Set<void> mln::Site_Set< E >::category [inherited] |
typedef point2d mln::p_line2d::element |
typedef E mln::Object< E >::exact_t [inherited] |
typedef p_indexed_fwd_piter<self_> mln::p_line2d::piter |
typedef p_indexed_psite<self_> mln::p_line2d::psite |
typedef const box2d& mln::p_line2d::q_box |
typedef p_line2d mln::p_line2d::self_ [private] |
Definition at line 81 of file p_line2d.hh.
typedef subject<P>::ret mln::internal::site_set_base_< P, E >::site [inherited] |
Site associated type.
Reimplemented in mln::p_centered< W >.
Definition at line 55 of file site_set_base.hh.
mln::p_line2d::p_line2d | ( | ) | [inline] |
mln::p_line2d::p_line2d | ( | const point2d & | beg, | |
const point2d & | end, | |||
bool | is_end_excluded = false | |||
) | [inline] |
Constructor from point beg
to point end
.
Definition at line 167 of file p_line2d.hh.
References compute_(), and is_valid().
const box2d & mln::p_line2d::bbox | ( | ) | const [inline] |
Give the exact bounding box.
Definition at line 273 of file p_line2d.hh.
References bb_, and is_valid().
const point2d & mln::p_line2d::begin | ( | ) | const [inline] |
Give the point that begins the line.
Definition at line 307 of file p_line2d.hh.
References arr_, and is_valid().
Referenced by compute_(), mln::debug::draw_graph(), mln::trait::set_precise_unary_< op::ord, p_line2d >::strict(), and to_vec().
void mln::p_line2d::compute_ | ( | const point2d & | beg, | |
const point2d & | end, | |||
bool | is_end_excluded | |||
) | [inline, protected] |
Definition at line 178 of file p_line2d.hh.
References mln::math::abs(), arr_, bb_, begin(), end(), mln::math::max(), mln::math::min(), mln::box< P >::pmax(), mln::box< P >::pmin(), and mln::math::sign().
Referenced by p_line2d().
const point2d & mln::p_line2d::end | ( | ) | const [inline] |
Give the point that ends the line.
Definition at line 315 of file p_line2d.hh.
References arr_, is_valid(), and nsites().
Referenced by compute_(), mln::debug::draw_graph(), mln::trait::set_precise_unary_< op::ord, p_line2d >::strict(), and to_vec().
bool mln::p_line2d::has | ( | const util::index & | i | ) | const [inline] |
Test if index i
belongs to this point set.
Definition at line 251 of file p_line2d.hh.
References nsites().
bool mln::p_line2d::has | ( | const psite & | p | ) | const [inline] |
Test if p
belongs to this point set.
Definition at line 240 of file p_line2d.hh.
References mln::p_indexed_psite< S >::index(), mln::p_indexed_psite< S >::target_(), and mln::internal::pseudo_site_base_< P, E >::to_site().
bool mln::internal::site_set_base_< P, E >::is_empty | ( | ) | const [inline, inherited] |
Test if the site set is empty.
This final method dispatches to is_empty_ whose default implementation relies on the 'nsites' method.
Definition at line 84 of file site_set_base.hh.
References mln::exact().
Referenced by mln::canvas::labeling::impl::generic::blobs(), mln::p_set_of< S >::clear(), mln::p_mutable_array_of< S >::clear(), mln::p_array< P >::clear(), mln::canvas::impl::generic::distance_geodesic(), mln::morpho::watershed::impl::generic::flooding(), mln::morpho::watershed::impl::flooding_fastest(), mln::p_queue_fast< P >::front(), mln::p_queue< P >::front(), mln::p_priority< P, Q >::front(), mln::p_priority< P, Q >::highest_priority(), mln::registration::icp(), mln::influence_zones(), mln::p_priority< P, Q >::lowest_priority(), mln::morpho::meyer_wst(), mln::p_queue_fast< P >::pop(), mln::p_queue< P >::pop(), mln::p_priority< P, Q >::pop(), mln::p_queue_fast< P >::pop_front(), mln::p_queue< P >::pop_front(), mln::p_priority< P, Q >::pop_front(), mln::registration::internal::registration_tests(), mln::geom::impl::seeds2tiling(), mln::geom::impl::seeds2tiling_roundness(), mln::morpho::skeleton_constrained(), and mln::morpho::watershed::topological().
bool mln::p_line2d::is_valid | ( | ) | const [inline] |
Test if this line is valid, i.e., initialized.
Definition at line 258 of file p_line2d.hh.
References arr_, bb_, mln::implies(), and mln::box< P >::is_valid().
Referenced by bbox(), begin(), end(), and p_line2d().
std::size_t mln::p_line2d::memory_size | ( | ) | const [inline] |
Return the size of this site set in memory.
Definition at line 323 of file p_line2d.hh.
References arr_.
unsigned mln::p_line2d::nsites | ( | ) | const [inline] |
Give the number of points.
Definition at line 266 of file p_line2d.hh.
References arr_.
Referenced by end(), has(), and operator[]().
const point2d & mln::p_line2d::operator[] | ( | unsigned | i | ) | const [inline] |
const std::vector< point2d > & mln::p_line2d::std_vector | ( | ) | const [inline] |
Return the corresponding std::vector of points.
Definition at line 281 of file p_line2d.hh.
References arr_.
algebra::vec< 2, float > mln::p_line2d::to_vec | ( | ) | const [inline] |
bool operator< | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
std::ostream & operator<< | ( | std::ostream & | ostr, | |
const Site_Set< S > & | set | |||
) | [related, inherited] |
bool operator<= | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
bool operator== | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
p_array<point2d> mln::p_line2d::arr_ [protected] |
Definition at line 149 of file p_line2d.hh.
Referenced by begin(), compute_(), end(), is_valid(), memory_size(), nsites(), operator[](), and std_vector().
box2d mln::p_line2d::bb_ [protected] |