#include <p_array.hh>
Public Types | |
typedef p_indexed_bkd_piter < self_ > | bkd_piter |
Backward Site_Iterator associated type. | |
typedef Site_Set< void > | category |
typedef P | element |
Element associated type. | |
typedef E | exact_t |
typedef p_indexed_fwd_piter < self_ > | fwd_piter |
Forward Site_Iterator associated type. | |
typedef P | i_element |
Insertion element associated type. | |
typedef fwd_piter | piter |
Site_Iterator associated type. | |
typedef p_indexed_psite< self_ > | psite |
Psite associated type. | |
typedef subject< P >::ret | site |
Site associated type. | |
typedef std::vector< P >::size_type | size_type |
Public Member Functions | |
p_array< P > & | append (const p_array< P > &other) |
Append an array other of points. | |
p_array< P > & | append (const P &p) |
Append a point p . | |
void | change (const psite &p, const P &new_p) |
Change site p into new_p . | |
void | clear () |
Clear this set. | |
bool | has (const util::index &i) const |
Test is index i belongs to this site set. | |
bool | has (const psite &p) const |
Test is p belongs to this site set. | |
std::vector< P > & | hook_std_vector_ () |
Hook to the std::vector. | |
void | insert (const P &p) |
Insert a point p (equivalent as 'append'). | |
bool | is_empty () const |
Test if the site set is empty. | |
bool | is_valid () const |
Test this set validity so returns always true. | |
std::size_t | memory_size () const |
Return the size of this site set in memory. | |
unsigned | nsites () const |
Give the number of sites. | |
const P & | operator[] (const util::index &i) const |
Return the i-th element. | |
P & | operator[] (unsigned i) |
Return the i-th site (mutable). | |
const P & | operator[] (unsigned i) const |
Return the i-th site (constant). | |
p_array (const std::vector< P > &vect) | |
Constructor from a vector vect . | |
p_array () | |
Constructor. | |
void | reserve (size_type n) |
Reserve n cells. | |
void | resize (size_t size) |
Update the size of this array. | |
const std::vector< P > & | std_vector () const |
Return the corresponding std::vector of points. | |
Protected Attributes | |
std::vector< P > | vect_ |
Private Types | |
typedef p_array< P > | 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 . |
Site set class based on std::vector.
Definition at line 83 of file p_array.hh.
typedef p_indexed_bkd_piter<self_> mln::p_array< P >::bkd_piter |
typedef Site_Set<void> mln::Site_Set< E >::category [inherited] |
typedef P mln::p_array< P >::element |
typedef E mln::Object< E >::exact_t [inherited] |
typedef p_indexed_fwd_piter<self_> mln::p_array< P >::fwd_piter |
typedef P mln::p_array< P >::i_element |
typedef fwd_piter mln::p_array< P >::piter |
typedef p_indexed_psite<self_> mln::p_array< P >::psite |
typedef p_array<P> mln::p_array< P >::self_ [private] |
Definition at line 85 of file p_array.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.
typedef std::vector<P>::size_type mln::p_array< P >::size_type |
Definition at line 87 of file p_array.hh.
mln::p_array< P >::p_array | ( | ) | [inline] |
mln::p_array< P >::p_array | ( | const std::vector< P > & | vect | ) | [inline] |
p_array< P > & mln::p_array< P >::append | ( | const p_array< P > & | other | ) | [inline] |
Append an array other
of points.
Definition at line 424 of file p_array.hh.
References mln::p_array< P >::std_vector(), and mln::p_array< P >::vect_.
p_array< P > & mln::p_array< P >::append | ( | const P & | p | ) | [inline] |
Append a point p
.
Definition at line 407 of file p_array.hh.
References mln::p_array< P >::vect_.
Referenced by mln::morpho::tree::impl::dual_hqueue(), mln::morpho::tree::impl::generic::dual_union_find(), mln::io::cloud::internal::load_data(), mln::registration::remove_too_far_sites(), and mln::convert::to_p_array().
void mln::p_array< P >::change | ( | const psite & | p, | |
const P & | new_p | |||
) | [inline] |
Change site p
into new_p
.
Definition at line 471 of file p_array.hh.
References mln::p_array< P >::has(), mln::p_indexed_psite< S >::index(), and mln::p_array< P >::vect_.
void mln::p_array< P >::clear | ( | ) | [inline] |
Clear this set.
Definition at line 435 of file p_array.hh.
References mln::internal::site_set_base_< P, E >::is_empty(), and mln::p_array< P >::vect_.
bool mln::p_array< P >::has | ( | const util::index & | i | ) | const [inline] |
Test is index i
belongs to this site set.
Definition at line 374 of file p_array.hh.
References mln::p_array< P >::nsites().
bool mln::p_array< P >::has | ( | const psite & | p | ) | const [inline] |
Test is p
belongs to this site set.
Definition at line 361 of file p_array.hh.
References mln::p_indexed_psite< S >::index(), and mln::p_indexed_psite< S >::target_().
Referenced by mln::p_array< P >::change(), and mln::p_array< P >::operator[]().
std::vector< P > & mln::p_array< P >::hook_std_vector_ | ( | ) | [inline] |
Hook to the std::vector.
Definition at line 496 of file p_array.hh.
References mln::p_array< P >::vect_.
Referenced by mln::data::impl::sort_psites_decreasing_(), and mln::data::impl::sort_psites_increasing_().
void mln::p_array< P >::insert | ( | const P & | p | ) | [inline] |
Insert a point p
(equivalent as 'append').
Definition at line 416 of file p_array.hh.
References mln::p_array< P >::vect_.
Referenced by mln::morpho::tree::data< I, S >::compute_children_().
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_array< P >::is_valid | ( | ) | const [inline] |
Test this set validity so returns always true.
Definition at line 382 of file p_array.hh.
Referenced by mln::registration::internal::registration_tests().
std::size_t mln::p_array< P >::memory_size | ( | ) | const [inline] |
Return the size of this site set in memory.
Definition at line 480 of file p_array.hh.
References mln::p_array< P >::nsites().
unsigned mln::p_array< P >::nsites | ( | ) | const [inline] |
Give the number of sites.
Definition at line 399 of file p_array.hh.
References mln::p_array< P >::vect_.
Referenced by mln::morpho::watershed::topo_wst< I, N >::BuildComponentTree(), mln::morpho::tree::data< I, S >::compute_children_(), mln::registration::compute_distance_criteria(), mln::registration::compute_standard_deviation(), mln::registration::get_rot(), mln::registration::get_rtransf(), mln::p_array< P >::has(), mln::p_array< P >::memory_size(), mln::p_array< P >::operator[](), mln::registration::internal::rms(), mln::morpho::reconstruction::by_erosion::impl::generic::union_find(), and mln::morpho::reconstruction::by_dilation::impl::generic::union_find().
const P & mln::p_array< P >::operator[] | ( | const util::index & | i | ) | const [inline] |
Return the i-th element.
Definition at line 390 of file p_array.hh.
References mln::p_array< P >::has(), and mln::p_array< P >::vect_.
P & mln::p_array< P >::operator[] | ( | unsigned | i | ) | [inline] |
Return the i-th
site (mutable).
Definition at line 462 of file p_array.hh.
References mln::p_array< P >::nsites(), and mln::p_array< P >::vect_.
const P & mln::p_array< P >::operator[] | ( | unsigned | i | ) | const [inline] |
Return the i-th
site (constant).
Definition at line 453 of file p_array.hh.
References mln::p_array< P >::nsites(), and mln::p_array< P >::vect_.
void mln::p_array< P >::reserve | ( | size_type | n | ) | [inline] |
Reserve n
cells.
Definition at line 353 of file p_array.hh.
References mln::p_array< P >::vect_.
Referenced by mln::morpho::tree::impl::dual_hqueue(), mln::morpho::tree::impl::generic::dual_union_find(), and mln::convert::to_p_array().
void mln::p_array< P >::resize | ( | size_t | size | ) | [inline] |
Update the size of this array.
Definition at line 444 of file p_array.hh.
References mln::p_array< P >::vect_.
const std::vector< P > & mln::p_array< P >::std_vector | ( | ) | const [inline] |
Return the corresponding std::vector of points.
Definition at line 488 of file p_array.hh.
References mln::p_array< P >::vect_.
Referenced by mln::p_array< P >::append().
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] |
std::vector<P> mln::p_array< P >::vect_ [protected] |
Definition at line 174 of file p_array.hh.
Referenced by mln::p_array< P >::append(), mln::p_array< P >::change(), mln::p_array< P >::clear(), mln::p_array< P >::hook_std_vector_(), mln::p_array< P >::insert(), mln::p_array< P >::nsites(), mln::p_array< P >::operator[](), mln::p_array< P >::reserve(), mln::p_array< P >::resize(), and mln::p_array< P >::std_vector().