#include <p_set.hh>
Inherits mln::internal::site_set_base_< P, mln::p_set< 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. | |
typedef P | r_element |
Removal element associated type. | |
Public Member Functions | |
void | clear () |
Clear this set. | |
bool | has (const util::index &i) const |
Test if index i belongs to this point set. | |
bool | has (const P &p) const |
Test if p belongs to this point set. | |
bool | has (const psite &p) const |
Test if psite p belongs to this point set. | |
void | insert (const P &p) |
Insert a site p . | |
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[] (unsigned i) const |
Return the i-th site. | |
p_set () | |
Constructor. | |
void | remove (const P &p) |
Remove a site p . | |
const std::vector< P > & | std_vector () const |
Return the corresponding std::vector of sites. | |
const util::set< P > & | util_set () const |
Return the corresponding util::set of sites. | |
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 . |
This is a mathematical set of sites (not a multi-set).
The parameter P
shall be a site or pseudo-site type.
typedef p_indexed_bkd_piter<self_> mln::p_set< P >::bkd_piter |
Backward Site_Iterator associated type.
typedef P mln::p_set< P >::element |
Element associated type.
typedef p_indexed_fwd_piter<self_> mln::p_set< P >::fwd_piter |
Forward Site_Iterator associated type.
typedef P mln::p_set< P >::i_element |
Insertion element associated type.
typedef fwd_piter mln::p_set< P >::piter |
Site_Iterator associated type.
typedef p_indexed_psite<self_> mln::p_set< P >::psite |
Psite associated type.
typedef P mln::p_set< P >::r_element |
Removal element associated type.
mln::p_set< P >::p_set | ( | ) | [inline] |
Constructor.
void mln::p_set< P >::clear | ( | ) | [inline] |
Clear this set.
bool mln::p_set< P >::has | ( | const util::index & | i | ) | const [inline] |
bool mln::p_set< P >::has | ( | const P & | p | ) | const [inline] |
bool mln::p_set< P >::has | ( | const psite & | p | ) | const [inline] |
void mln::p_set< P >::insert | ( | const P & | p | ) | [inline] |
bool mln::p_set< P >::is_valid | ( | ) | const [inline] |
Test this set validity so returns always true.
std::size_t mln::p_set< P >::memory_size | ( | ) | const [inline] |
Return the size of this site set in memory.
unsigned mln::p_set< P >::nsites | ( | ) | const [inline] |
Give the number of sites.
Referenced by mln::p_key< K, P >::change_key(), mln::p_set< P >::has(), mln::p_set< P >::operator[](), and mln::p_key< K, P >::remove_key().
const P & mln::p_set< P >::operator[] | ( | unsigned | i | ) | const [inline] |
void mln::p_set< P >::remove | ( | const P & | p | ) | [inline] |
Remove a site p
.
const std::vector< P > & mln::p_set< P >::std_vector | ( | ) | const [inline] |
Return the corresponding std::vector of sites.
const util::set< P > & mln::p_set< P >::util_set | ( | ) | const [inline] |
Return the corresponding util::set of sites.
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
.