#include <p_line2d.hh>
Inherits mln::internal::site_set_base_< mln::point, mln::p_line2d >.
Public Types | |
typedef p_indexed_bkd_piter < self_ > | bkd_piter |
Backward Site_Iterator associated type. | |
typedef point2d | element |
Element associated type. | |
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. | |
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_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. | |
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.
Backward Site_Iterator associated type.
typedef point2d mln::p_line2d::element |
Element associated type.
Forward Site_Iterator associated type.
typedef p_indexed_fwd_piter<self_> mln::p_line2d::piter |
Site_Iterator associated type.
typedef p_indexed_psite<self_> mln::p_line2d::psite |
Psite associated type.
typedef const box2d& mln::p_line2d::q_box |
Box (qualified) associated type.
mln::p_line2d::p_line2d | ( | ) | [inline] |
const box2d & mln::p_line2d::bbox | ( | ) | const [inline] |
const point2d & mln::p_line2d::begin | ( | ) | const [inline] |
const point2d & mln::p_line2d::end | ( | ) | const [inline] |
Give the point that ends the line.
References is_valid(), and nsites().
Referenced by mln::debug::draw_graph().
bool mln::p_line2d::has | ( | const util::index & | i | ) | const [inline] |
bool mln::p_line2d::has | ( | const psite & | p | ) | const [inline] |
bool mln::p_line2d::is_valid | ( | ) | const [inline] |
Test if this line is valid, i.e., initialized.
References mln::implies().
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.
unsigned mln::p_line2d::nsites | ( | ) | const [inline] |
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.
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
.