4 #include <boost/iterator/iterator_facade.hpp>
5 #include <boost/operators.hpp>
6 #include <boost/foreach.hpp>
11 template<
class T>
class poly;
17 boost::incrementable< poly<T>,
18 boost::addable< poly<T>,
19 boost::multipliable< poly<T>,
20 boost::multipliable2< poly<T>, T,
21 boost::less_than_comparable< poly<T> > > > > > {
36 while( column!=
columns.end() && Rcolumn!=R.
columns.end() && *column==*Rcolumn) { ++column; ++Rcolumn; }
37 return column!=
columns.end() && Rcolumn!=R.
columns.end() && *column < *Rcolumn;
60 size *= column->size();
65 :
public boost::iterator_facade< const_iterator, T const, boost::bidirectional_traversal_tag, T > {
68 std::list<typename std::set<T>::const_iterator>
state;
71 typedef typename std::list<typename std::set<T>::const_iterator>::iterator
state_iterator;
79 while( column !=
end && ++*istate == column->
end() ) { ++istate; ++column;}
80 if( column ==
end ) {--column; --istate;}
81 while( istate !=
state.begin() ) {--istate; *istate = (--column)->
begin();}
86 while( column !=
end && *istate == column->
begin()) { ++istate; ++column;}
87 if( column !=
end) --*istate;
88 while( istate !=
state.begin() ) {--istate; *istate = --((--column)->
end());}
111 template <
class charT,
class traits,
class T>
113 std::basic_ostream<charT,traits>& operator<<(std::basic_ostream<charT,traits>& strm,
const poly<T>&
f) {
114 BOOST_FOREACH(std::set<T> column, std::make_pair(
f.begin_columns(),
f.end_columns()))
115 { strm <<
"( "; BOOST_FOREACH(
T entry, column) strm << entry <<
", "; strm <<
" )" << std::endl; }
const_iterator(const poly &p)
const_iterator end() const
column_iterator end_columns()
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
poly operator*=(const T &r)
std::list< std::set< T > >::const_iterator begin
std::list< typename std::set< T >::const_iterator > state
const_column_iterator begin_columns() const
poly operator+=(const poly &R)
const_iterator begin() const
bool equal(const_iterator const &rhs) const
std::list< std::set< T > > columns
std::pair< std::string, MonitorElement * > entry
std::list< typename std::set< T >::const_iterator >::const_iterator const_state_iterator
std::list< std::set< T > >::const_iterator const_column_iterator
std::list< typename std::set< T >::const_iterator >::iterator state_iterator
static const_iterator end_of(const poly &p)
const_column_iterator end_columns() const
bool operator<(const poly &R) const
friend class boost::iterator_core_access
std::list< std::set< T > >::iterator column_iterator
poly operator*=(const poly &R)
poly operator+=(const T &r)
std::list< std::set< T > >::const_iterator end
column_iterator begin_columns()