CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
poly< T >::const_iterator Class Reference

#include <poly.h>

Inheritance diagram for poly< T >::const_iterator:

Public Member Functions

 const_iterator ()
 
 const_iterator (const poly &p)
 

Static Public Member Functions

static const_iterator end_of (const poly &p)
 

Private Types

typedef std::list< typename
std::set< T >::const_iterator >
::const_iterator 
const_state_iterator
 
typedef std::list< typename
std::set< T >::const_iterator >
::iterator 
state_iterator
 

Private Member Functions

void decrement ()
 
T dereference () const
 
bool equal (const_iterator const &rhs) const
 
void increment ()
 

Private Attributes

std::list< std::set< T >
>::const_iterator 
begin
 
std::list< std::set< T >
>::const_iterator 
end
 
std::list< typename std::set
< T >::const_iterator
state
 

Friends

class boost::iterator_core_access
 

Detailed Description

template<class T>
class poly< T >::const_iterator

Definition at line 80 of file poly.h.

Member Typedef Documentation

template<class T>
typedef std::list<typename std::set<T>::const_iterator>::const_iterator poly< T >::const_iterator::const_state_iterator
private

Definition at line 87 of file poly.h.

template<class T>
typedef std::list<typename std::set<T>::const_iterator>::iterator poly< T >::const_iterator::state_iterator
private

Definition at line 86 of file poly.h.

Constructor & Destructor Documentation

template<class T>
poly< T >::const_iterator::const_iterator ( )
inline

Definition at line 128 of file poly.h.

128 {}
template<class T>
poly< T >::const_iterator::const_iterator ( const poly p)
inline

Definition at line 129 of file poly.h.

References poly< T >::const_iterator::begin, poly< T >::const_iterator::end, and poly< T >::const_iterator::state.

129  : begin(p.getColumns().begin()), end(p.getColumns().end()) {
130  const_column_iterator column = begin;
131  while (column != end)
132  state.push_back((column++)->begin());
133  }
auto const & getColumns() const
Definition: poly.h:68
std::list< std::set< T > >::const_iterator begin
Definition: poly.h:84
std::list< typename std::set< T >::const_iterator > state
Definition: poly.h:83
std::list< std::set< T > >::const_iterator const_column_iterator
Definition: poly.h:30
std::list< std::set< T > >::const_iterator end
Definition: poly.h:84

Member Function Documentation

template<class T>
void poly< T >::const_iterator::decrement ( )
inlineprivate

Definition at line 112 of file poly.h.

References poly< T >::const_iterator::begin, poly< T >::const_iterator::end, and poly< T >::const_iterator::state.

112  {
113  state_iterator istate = state.begin();
114  const_column_iterator column = begin;
115  while (column != end && *istate == column->begin()) {
116  ++istate;
117  ++column;
118  }
119  if (column != end)
120  --*istate;
121  while (istate != state.begin()) {
122  --istate;
123  *istate = --((--column)->end());
124  }
125  }
std::list< std::set< T > >::const_iterator begin
Definition: poly.h:84
std::list< typename std::set< T >::const_iterator > state
Definition: poly.h:83
std::list< std::set< T > >::const_iterator const_column_iterator
Definition: poly.h:30
std::list< typename std::set< T >::const_iterator >::iterator state_iterator
Definition: poly.h:86
std::list< std::set< T > >::const_iterator end
Definition: poly.h:84
template<class T>
T poly< T >::const_iterator::dereference ( ) const
inlineprivate

Definition at line 90 of file poly.h.

References alignCSCRings::s, and poly< T >::const_iterator::state.

90  {
91  T s;
92  for (const_state_iterator istate = state.begin(); istate != state.end(); ++istate)
93  s += **istate;
94  return s;
95  }
std::list< typename std::set< T >::const_iterator > state
Definition: poly.h:83
std::list< typename std::set< T >::const_iterator >::const_iterator const_state_iterator
Definition: poly.h:87
long double T
template<class T>
static const_iterator poly< T >::const_iterator::end_of ( const poly p)
inlinestatic

Definition at line 134 of file poly.h.

References poly< T >::const_iterator::end, poly< T >::getColumns(), poly< T >::size(), and poly< T >::const_iterator::state.

Referenced by poly< T >::end().

134  {
135  const_iterator it(p);
136  if (p.size() != 0)
137  *--(it.state.end()) = (--p.getColumns().end())->end();
138  return it;
139  }
auto const & getColumns() const
Definition: poly.h:68
size_t size() const
Definition: poly.h:71
std::list< std::set< T > >::const_iterator end
Definition: poly.h:84
template<class T>
bool poly< T >::const_iterator::equal ( const_iterator const &  rhs) const
inlineprivate

Definition at line 89 of file poly.h.

References cond::serialization::equal(), and poly< T >::const_iterator::state.

89 { return std::equal(state.begin(), state.end(), rhs.state.begin()); }
std::list< typename std::set< T >::const_iterator > state
Definition: poly.h:83
bool equal(const T &first, const T &second)
Definition: Equal.h:32
template<class T>
void poly< T >::const_iterator::increment ( )
inlineprivate

Definition at line 96 of file poly.h.

References poly< T >::const_iterator::begin, poly< T >::const_iterator::end, and poly< T >::const_iterator::state.

96  {
97  state_iterator istate = state.begin();
99  while (column != end && ++*istate == column->end()) {
100  ++istate;
101  ++column;
102  }
103  if (column == end) {
104  --column;
105  --istate;
106  }
107  while (istate != state.begin()) {
108  --istate;
109  *istate = (--column)->begin();
110  }
111  }
std::list< std::set< T > >::const_iterator begin
Definition: poly.h:84
std::list< typename std::set< T >::const_iterator > state
Definition: poly.h:83
std::list< std::set< T > >::const_iterator const_column_iterator
Definition: poly.h:30
std::list< typename std::set< T >::const_iterator >::iterator state_iterator
Definition: poly.h:86
std::list< std::set< T > >::const_iterator end
Definition: poly.h:84

Friends And Related Function Documentation

template<class T>
friend class boost::iterator_core_access
friend

Definition at line 81 of file poly.h.

Member Data Documentation

template<class T>
std::list<std::set<T> >::const_iterator poly< T >::const_iterator::begin
private
template<class T>
std::list<std::set<T> >::const_iterator poly< T >::const_iterator::end
private
template<class T>
std::list<typename std::set<T>::const_iterator> poly< T >::const_iterator::state
private