mln::p_run< P > Class Template Reference
[Basic types]

Point set class in run. More...

#include <p_run.hh>

Inherits mln::internal::site_set_base_< P, mln::p_run< P > >.

List of all members.

Public Types

typedef p_run_bkd_piter_< P > bkd_piter
 Backward Site_Iterator associated type.
typedef P element
 Element associated type.
typedef p_run_fwd_piter_< P > fwd_piter
 Forward Site_Iterator associated type.
typedef fwd_piter piter
 Site_Iterator associated type.
typedef p_run_psite< P > psite
 Psite associated type.
typedef mln::box< P > q_box
 Box associated type.

Public Member Functions

mln::box< P > bbox () const
 Give the exact bounding box.
end () const
 Return (compute) the ending point.
bool has (const P &p) const
 Test if p belongs to this point set.
bool has (const psite &p) const
 Test if p belongs to this point set.
bool has_index (unsigned short i) const
 Test if index i belongs to this point set.
void init (const P &start, unsigned short len)
 Set the starting point.
bool is_valid () const
 Test if this run is valid, i.e., with length > 0.
unsigned short length () const
 Give the length of the run.
std::size_t memory_size () const
 Return the size of this site set in memory.
unsigned nsites () const
 Give the number of sites.
operator[] (unsigned short i) const
 Return the i-th point.
 p_run (const P &start, const P &end)
 Constructor.
 p_run (const P &start, unsigned short len)
 Constructor.
 p_run ()
 Constructor without argument.
const P & start () const
 Return the starting point.

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.


Detailed Description

template<typename P>
class mln::p_run< P >

Point set class in run.

This is a mathematical set of points (not a multi-set). The parameter P shall be a Point type.


Member Typedef Documentation

template<typename P>
typedef p_run_bkd_piter_<P> mln::p_run< P >::bkd_piter

Backward Site_Iterator associated type.

template<typename P>
typedef P mln::p_run< P >::element

Element associated type.

template<typename P>
typedef p_run_fwd_piter_<P> mln::p_run< P >::fwd_piter

Forward Site_Iterator associated type.

template<typename P>
typedef fwd_piter mln::p_run< P >::piter

Site_Iterator associated type.

template<typename P>
typedef p_run_psite<P> mln::p_run< P >::psite

Psite associated type.

template<typename P>
typedef mln::box<P> mln::p_run< P >::q_box

Box associated type.


Constructor & Destructor Documentation

template<typename P>
mln::p_run< P >::p_run (  )  [inline]

Constructor without argument.

template<typename P>
mln::p_run< P >::p_run ( const P &  start,
unsigned short  len 
) [inline]

Constructor.

References mln::p_run< P >::init().

template<typename P>
mln::p_run< P >::p_run ( const P &  start,
const P &  end 
) [inline]

Constructor.


Member Function Documentation

template<typename P>
mln::box< P > mln::p_run< P >::bbox (  )  const [inline]

Give the exact bounding box.

References mln::p_run< P >::end().

template<typename P>
P mln::p_run< P >::end (  )  const [inline]

Return (compute) the ending point.

References mln::point< G, C >::last_coord().

Referenced by mln::p_run< P >::bbox().

template<typename P>
bool mln::p_run< P >::has ( const P &  p  )  const [inline]

Test if p belongs to this point set.

References mln::p_run< P >::is_valid().

template<typename P>
bool mln::p_run< P >::has ( const psite p  )  const [inline]

Test if p belongs to this point set.

template<typename P>
bool mln::p_run< P >::has_index ( unsigned short  i  )  const [inline]

Test if index i belongs to this point set.

template<typename P>
void mln::p_run< P >::init ( const P &  start,
unsigned short  len 
) [inline]

Set the starting point.

Referenced by mln::p_run< P >::p_run().

template<typename P>
bool mln::p_run< P >::is_valid (  )  const [inline]

Test if this run is valid, i.e., with length > 0.

Referenced by mln::p_run< P >::has(), mln::p_run< P >::length(), mln::p_run< P >::nsites(), and mln::p_run< P >::operator[]().

template<typename P>
unsigned short mln::p_run< P >::length (  )  const [inline]

Give the length of the run.

References mln::p_run< P >::is_valid().

template<typename P>
std::size_t mln::p_run< P >::memory_size (  )  const [inline]

Return the size of this site set in memory.

template<typename P>
unsigned mln::p_run< P >::nsites (  )  const [inline]

Give the number of sites.

References mln::p_run< P >::is_valid().

template<typename P>
P mln::p_run< P >::operator[] ( unsigned short  i  )  const [inline]

template<typename P>
const P & mln::p_run< P >::start (  )  const [inline]

Return the starting point.


Friends And Related Function Documentation

template<typename Sl, typename Sr>
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.

template<typename Sl, typename Sr>
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.

template<typename Sl, typename Sr>
bool operator< ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Strict inclusion test between site sets lhs and rhs.

Parameters:
[in] lhs A site set (strictly included?).
[in] rhs Another site set (includer?).

template<typename S>
std::ostream & operator<< ( std::ostream &  ostr,
const Site_Set< S > &  set 
) [related, inherited]

Print a site set set into the output stream ostr.

Parameters:
[in,out] ostr An output stream.
[in] set A site set.
Returns:
The modified output stream ostr.

template<typename Sl, typename Sr>
bool operator<= ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Inclusion test between site sets lhs and rhs.

Parameters:
[in] lhs A site set (included?).
[in] rhs Another site set (includer?).

template<typename Sl, typename Sr>
bool operator== ( const Site_Set< Sl > &  lhs,
const Site_Set< Sr > &  rhs 
) [related, inherited]

Equality test between site sets lhs and rhs.

Parameters:
[in] lhs A site set.
[in] rhs Another site set.

template<typename Sl, typename Sr>
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.

template<typename Sl, typename Sr>
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.

template<typename S>
p_set< typename S::site > unique ( const Site_Set< S > &  s  )  [related, inherited]

Give the unique set of s.


Generated on Thu Sep 9 19:30:53 2010 for Milena (Olena) by  doxygen 1.5.6