CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes | Friends
poly< T > Class Template Reference

#include <poly.h>

Inheritance diagram for poly< T >:

Classes

class  const_iterator
 

Public Types

typedef std::list< std::set< T > >::iterator column_iterator
 
typedef std::list< std::set< T > >::const_iterator const_column_iterator
 
typedef T value_type
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
auto const & getColumns () const
 
auto & getColumns ()
 
poly operator*= (const T &r)
 
poly operator*= (const poly &R)
 
poly operator++ ()
 
poly operator+= (const poly &R)
 
poly operator+= (const T &r)
 
bool operator< (const poly &R) const
 
 poly ()
 
 poly (const T &t)
 
size_t size () const
 

Private Attributes

std::list< std::set< T > > columns
 

Friends

poly< Toperator+ (const poly< T > &, const char *)
 
poly< Toperator+ (const char *, const poly< T > &)
 

Detailed Description

template<class T>
class poly< T >

Definition at line 11 of file poly.h.

Member Typedef Documentation

◆ column_iterator

template<class T>
typedef std::list<std::set<T> >::iterator poly< T >::column_iterator

Definition at line 29 of file poly.h.

◆ const_column_iterator

template<class T>
typedef std::list<std::set<T> >::const_iterator poly< T >::const_column_iterator

Definition at line 30 of file poly.h.

◆ value_type

template<class T>
typedef T poly< T >::value_type

Definition at line 27 of file poly.h.

Constructor & Destructor Documentation

◆ poly() [1/2]

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

Definition at line 31 of file poly.h.

31 {}

◆ poly() [2/2]

template<class T>
poly< T >::poly ( const T t)
inline

Definition at line 32 of file poly.h.

References poly< T >::operator+=(), and submitPVValidationJobs::t.

32 { operator+=(t); }
poly operator+=(const poly &R)
Definition: poly.h:46

Member Function Documentation

◆ begin()

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

Definition at line 65 of file poly.h.

65 { return const_iterator(*this); }

◆ end()

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

Definition at line 66 of file poly.h.

References poly< T >::const_iterator::end_of().

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

66 { return const_iterator::end_of(*this); }
static const_iterator end_of(const poly &p)
Definition: poly.h:134

◆ getColumns() [1/2]

template<class T>
auto const& poly< T >::getColumns ( ) const
inline

Definition at line 68 of file poly.h.

References poly< T >::columns.

68 { return columns; }
std::list< std::set< T > > columns
Definition: poly.h:24

◆ getColumns() [2/2]

template<class T>
auto& poly< T >::getColumns ( )
inline

Definition at line 69 of file poly.h.

References poly< T >::columns.

69 { return columns; }
std::list< std::set< T > > columns
Definition: poly.h:24

◆ operator*=() [1/2]

template<class T>
poly poly< T >::operator*= ( const T r)
inline

Definition at line 54 of file poly.h.

References poly< T >::columns, and alignCSCRings::r.

Referenced by poly< T >::operator+=().

54  {
55  columns.back().insert(r);
56  return *this;
57  }
std::list< std::set< T > > columns
Definition: poly.h:24

◆ operator*=() [2/2]

template<class T>
poly poly< T >::operator*= ( const poly< T > &  R)
inline

Definition at line 58 of file poly.h.

References poly< T >::columns, and dttmaxenums::R.

58  {
59  columns.back().insert(R.begin(), R.end());
60  return *this;
61  }
std::list< std::set< T > > columns
Definition: poly.h:24

◆ operator++()

template<class T>
poly poly< T >::operator++ ( )
inline

Definition at line 42 of file poly.h.

References poly< T >::columns.

Referenced by poly< T >::operator+=().

42  {
43  columns.push_back(std::set<T>());
44  return *this;
45  }
std::list< std::set< T > > columns
Definition: poly.h:24

◆ operator+=() [1/2]

template<class T>
poly poly< T >::operator+= ( const poly< T > &  R)
inline

Definition at line 46 of file poly.h.

References poly< T >::columns, and dttmaxenums::R.

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

46  {
47  columns.insert(columns.end(), R.columns.begin(), R.columns.end());
48  return *this;
49  }
std::list< std::set< T > > columns
Definition: poly.h:24

◆ operator+=() [2/2]

template<class T>
poly poly< T >::operator+= ( const T r)
inline

Definition at line 50 of file poly.h.

References poly< T >::operator*=(), poly< T >::operator++(), and alignCSCRings::r.

50  {
51  operator++();
52  return operator*=(r);
53  }
poly operator*=(const T &r)
Definition: poly.h:54
poly operator++()
Definition: poly.h:42

◆ operator<()

template<class T>
bool poly< T >::operator< ( const poly< T > &  R) const
inline

Definition at line 34 of file poly.h.

References poly< T >::columns, and dttmaxenums::R.

34  {
35  const_column_iterator column(columns.begin()), Rcolumn(R.columns.begin());
36  while (column != columns.end() && Rcolumn != R.columns.end() && *column == *Rcolumn) {
37  ++column;
38  ++Rcolumn;
39  }
40  return column != columns.end() && Rcolumn != R.columns.end() && *column < *Rcolumn;
41  }
std::list< std::set< T > > columns
Definition: poly.h:24
std::list< std::set< T > >::const_iterator const_column_iterator
Definition: poly.h:30

◆ size()

template<class T>
size_t poly< T >::size ( void  ) const
inline

Definition at line 71 of file poly.h.

References poly< T >::columns.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

71  {
72  if (columns.empty())
73  return 0;
74  size_t size = 1;
75  for (const_column_iterator column = columns.begin(); column != columns.end(); ++column)
76  size *= column->size();
77  return size;
78  }
std::list< std::set< T > > columns
Definition: poly.h:24
std::list< std::set< T > >::const_iterator const_column_iterator
Definition: poly.h:30
size_t size() const
Definition: poly.h:71

Friends And Related Function Documentation

◆ operator+ [1/2]

template<class T>
poly<T> operator+ ( const poly< T > &  lhs,
const char *  rhs 
)
friend

Definition at line 144 of file poly.h.

144  {
145  return lhs + poly<T>(rhs);
146 }
Definition: poly.h:11

◆ operator+ [2/2]

template<class T>
poly<T> operator+ ( const char *  lhs,
const poly< T > &  rhs 
)
friend

Definition at line 148 of file poly.h.

148  {
149  return poly<T>(lhs) + rhs;
150 }
Definition: poly.h:11

Member Data Documentation

◆ columns

template<class T>
std::list<std::set<T> > poly< T >::columns
private