#include <p_array.hh>
Inherits mln::internal::site_set_base_< P, mln::p_array< P > >.
Public Types | |
typedef p_indexed_bkd_piter < self_ > | bkd_piter |
Backward Site_Iterator associated type. | |
typedef P | element |
Element associated type. | |
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. | |
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. | |
void | insert (const P &p) |
Insert a point p (equivalent as 'append'). | |
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. | |
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.
typedef p_indexed_bkd_piter<self_> mln::p_array< P >::bkd_piter |
Backward Site_Iterator associated type.
typedef P mln::p_array< P >::element |
Element associated type.
typedef p_indexed_fwd_piter<self_> mln::p_array< P >::fwd_piter |
Forward Site_Iterator associated type.
typedef P mln::p_array< P >::i_element |
Insertion element associated type.
typedef fwd_piter mln::p_array< P >::piter |
Site_Iterator associated type.
typedef p_indexed_psite<self_> mln::p_array< P >::psite |
Psite associated type.
mln::p_array< P >::p_array | ( | ) | [inline] |
Constructor.
mln::p_array< P >::p_array | ( | const std::vector< P > & | vect | ) | [inline] |
Constructor from a vector vect
.
p_array< P > & mln::p_array< P >::append | ( | const p_array< P > & | other | ) | [inline] |
p_array< P > & mln::p_array< P >::append | ( | const P & | p | ) | [inline] |
void mln::p_array< P >::change | ( | const psite & | p, | |
const P & | new_p | |||
) | [inline] |
Change site p
into new_p
.
References mln::p_array< P >::has(), and mln::p_indexed_psite< S >::index().
void mln::p_array< P >::clear | ( | ) | [inline] |
Clear this set.
bool mln::p_array< P >::has | ( | const util::index & | i | ) | const [inline] |
bool mln::p_array< P >::has | ( | const psite & | p | ) | const [inline] |
Test is p
belongs to this site set.
References mln::p_indexed_psite< S >::index().
Referenced by mln::p_array< P >::change(), and mln::p_array< P >::operator[]().
void mln::p_array< P >::insert | ( | const P & | p | ) | [inline] |
Insert a point p
(equivalent as 'append').
bool mln::p_array< P >::is_valid | ( | ) | const [inline] |
Test this set validity so returns always true.
std::size_t mln::p_array< P >::memory_size | ( | ) | const [inline] |
unsigned mln::p_array< P >::nsites | ( | ) | const [inline] |
Give the number of sites.
Referenced by mln::registration::get_rot(), mln::p_array< P >::has(), mln::p_array< P >::memory_size(), and mln::p_array< P >::operator[]().
const P & mln::p_array< P >::operator[] | ( | const util::index & | i | ) | const [inline] |
P & mln::p_array< P >::operator[] | ( | unsigned | i | ) | [inline] |
const P & mln::p_array< P >::operator[] | ( | unsigned | i | ) | const [inline] |
void mln::p_array< P >::reserve | ( | size_type | n | ) | [inline] |
void mln::p_array< P >::resize | ( | size_t | size | ) | [inline] |
Update the size of this array.
const std::vector< P > & mln::p_array< P >::std_vector | ( | ) | const [inline] |
p_set< typename Sl::site > diff | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
Set theoretic difference of lhs
and rhs
.
p_set< typename Sl::site > inter | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
Intersection between a couple of point sets.
std::ostream & operator<< | ( | std::ostream & | ostr, | |
const Site_Set< S > & | set | |||
) | [related, inherited] |
p_set< typename Sl::site > sym_diff | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
Set theoretic symmetrical difference of lhs
and rhs
.
p_set< typename Sl::site > uni | ( | const Site_Set< Sl > & | lhs, | |
const Site_Set< Sr > & | rhs | |||
) | [related, inherited] |
Union of a couple of point sets.
p_set< typename S::site > unique | ( | const Site_Set< S > & | s | ) | [related, inherited] |
Give the unique set of s
.