CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Private Attributes | Friends

poly< T > Class Template Reference

#include <poly.h>

List of all members.

Classes

class  const_iterator

Public Types

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

Public Member Functions

const_iterator begin () const
const_iterator begin () const
column_iterator begin_columns ()
const_column_iterator begin_columns () const
column_iterator begin_columns ()
const_column_iterator begin_columns () const
const_iterator end () const
const_iterator end () const
const_column_iterator end_columns () const
column_iterator end_columns ()
column_iterator end_columns ()
const_column_iterator end_columns () const
poly operator*= (const poly &R)
poly operator*= (const poly &R)
poly operator*= (const T &r)
poly operator*= (const T &r)
poly operator++ ()
poly operator++ ()
poly operator+= (const poly &R)
poly operator+= (const poly &R)
poly operator+= (const T &r)
poly operator+= (const T &r)
bool operator< (const poly &R) const
bool operator< (const poly &R) const
 poly ()
 poly (const T &t)
 poly (const T &t)
 poly ()
size_t size () const
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 > &)
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 16 of file poly.h.


Member Typedef Documentation

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

Definition at line 29 of file poly.h.

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

Definition at line 29 of file poly.h.

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

Definition at line 30 of file poly.h.

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

Definition at line 30 of file poly.h.

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

Definition at line 27 of file poly.h.

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

Definition at line 27 of file poly.h.


Constructor & Destructor Documentation

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

Definition at line 31 of file poly.h.

{}
template<class T>
poly< T >::poly ( const T t) [inline]

Definition at line 32 of file poly.h.

References poly< T >::operator+=().

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

Definition at line 31 of file poly.h.

{}
template<class T>
poly< T >::poly ( const T t) [inline]

Definition at line 32 of file poly.h.

References poly< T >::operator+=().


Member Function Documentation

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

Definition at line 47 of file poly.h.

Referenced by Book::fill(), and poly< T >::operator*=().

{ return const_iterator(*this);}
template<class T>
const_iterator poly< T >::begin ( void  ) const [inline]

Definition at line 47 of file poly.h.

{ return const_iterator(*this);}
template<class T>
column_iterator poly< T >::begin_columns ( ) [inline]

Definition at line 50 of file poly.h.

References poly< T >::columns.

{ return columns.begin();}
template<class T>
const_column_iterator poly< T >::begin_columns ( ) const [inline]

Definition at line 53 of file poly.h.

References poly< T >::columns.

{ return columns.begin();}
template<class T>
column_iterator poly< T >::begin_columns ( ) [inline]

Definition at line 50 of file poly.h.

References poly< T >::columns.

{ return columns.begin();}
template<class T>
const_column_iterator poly< T >::begin_columns ( ) const [inline]

Definition at line 53 of file poly.h.

References poly< T >::columns.

{ return columns.begin();}
template<class T>
const_iterator poly< T >::end ( ) const [inline]

Definition at line 48 of file poly.h.

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

Referenced by Book::fill(), and poly< T >::operator*=().

{ return const_iterator::end_of(*this);} 
template<class T>
const_iterator poly< T >::end ( void  ) const [inline]

Definition at line 48 of file poly.h.

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

{ return const_iterator::end_of(*this);} 
template<class T>
column_iterator poly< T >::end_columns ( ) [inline]

Definition at line 51 of file poly.h.

References poly< T >::columns.

{ return columns.end();}
template<class T>
column_iterator poly< T >::end_columns ( ) [inline]

Definition at line 51 of file poly.h.

References poly< T >::columns.

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

{ return columns.end();}
template<class T>
const_column_iterator poly< T >::end_columns ( ) const [inline]

Definition at line 54 of file poly.h.

References poly< T >::columns.

{ return columns.end();}
template<class T>
const_column_iterator poly< T >::end_columns ( ) const [inline]

Definition at line 54 of file poly.h.

References poly< T >::columns.

{ return columns.end();}
template<class T>
poly poly< T >::operator*= ( const T r) [inline]

Definition at line 42 of file poly.h.

References poly< T >::columns.

{ columns.back().insert(r); return *this;}    
template<class T>
poly poly< T >::operator*= ( const poly< T > &  R) [inline]

Definition at line 43 of file poly.h.

References poly< T >::begin(), poly< T >::columns, and poly< T >::end().

{ columns.back().insert(R.begin(),R.end()); return *this;}    
template<class T>
poly poly< T >::operator*= ( const T r) [inline]

Definition at line 42 of file poly.h.

References poly< T >::columns.

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

{ columns.back().insert(r); return *this;}    
template<class T>
poly poly< T >::operator*= ( const poly< T > &  R) [inline]

Definition at line 43 of file poly.h.

References poly< T >::begin(), poly< T >::columns, and poly< T >::end().

{ columns.back().insert(R.begin(),R.end()); return *this;}    
template<class T>
poly poly< T >::operator++ ( void  ) [inline]

Definition at line 39 of file poly.h.

References poly< T >::columns.

{columns.push_back(std::set<T>()); return *this;}                    
template<class T>
poly poly< T >::operator++ ( ) [inline]

Definition at line 39 of file poly.h.

References poly< T >::columns.

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

{columns.push_back(std::set<T>()); return *this;}                    
template<class T>
poly poly< T >::operator+= ( const poly< T > &  R) [inline]

Definition at line 40 of file poly.h.

References poly< T >::columns.

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

{ columns.insert(columns.end(),R.columns.begin(),R.columns.end()); return *this;}
template<class T>
poly poly< T >::operator+= ( const poly< T > &  R) [inline]

Definition at line 40 of file poly.h.

References poly< T >::columns.

{ columns.insert(columns.end(),R.columns.begin(),R.columns.end()); return *this;}
template<class T>
poly poly< T >::operator+= ( const T r) [inline]

Definition at line 41 of file poly.h.

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

{ operator++(); return operator*=(r);}
template<class T>
poly poly< T >::operator+= ( const T r) [inline]

Definition at line 41 of file poly.h.

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

{ operator++(); return operator*=(r);}
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.

                                        { 
      const_column_iterator column(columns.begin()), Rcolumn(R.columns.begin());
      while( column!=columns.end() && Rcolumn!=R.columns.end() && *column==*Rcolumn) { ++column; ++Rcolumn; }
      return column!=columns.end() && Rcolumn!=R.columns.end() && *column < *Rcolumn;
    }  
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.

                                        { 
      const_column_iterator column(columns.begin()), Rcolumn(R.columns.begin());
      while( column!=columns.end() && Rcolumn!=R.columns.end() && *column==*Rcolumn) { ++column; ++Rcolumn; }
      return column!=columns.end() && Rcolumn!=R.columns.end() && *column < *Rcolumn;
    }  
template<class T>
size_t poly< T >::size ( void  ) const [inline]

Definition at line 56 of file poly.h.

References poly< T >::columns.

Referenced by poly< T >::const_iterator::end_of(), and poly< T >::size().

                        { 
      if(columns.empty()) return 0;
      size_t size=1;
      for( const_column_iterator column = columns.begin(); column != columns.end(); ++column) 
        size *= column->size(); 
      return size;
    }
template<class T>
size_t poly< T >::size ( void  ) const [inline]

Definition at line 56 of file poly.h.

References poly< T >::columns, and poly< T >::size().

                        { 
      if(columns.empty()) return 0;
      size_t size=1;
      for( const_column_iterator column = columns.begin(); column != columns.end(); ++column) 
        size *= column->size(); 
      return size;
    }

Friends And Related Function Documentation

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

Member Data Documentation

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