Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator Class Reference

Iterator class for iterating over elements of the index set. More...

#include <Stokhos_ProductBasisUtils.hpp>

Inherits iterator< std::input_iterator_tag, multiindex_type >.

Public Types

typedef std::iterator
< std::input_iterator_tag,
multiindex_type
base_type
 
typedef
base_type::iterator_category 
iterator_category
 
typedef base_type::value_type value_type
 
typedef base_type::difference_type difference_type
 
typedef base_type::reference reference
 
typedef base_type::pointer pointer
 
typedef const multiindex_typeconst_reference
 
typedef const multiindex_typeconst_pointer
 

Public Member Functions

 Iterator (ordinal_type max_order_, const multiindex_type &index_)
 Constructor. More...
 
bool operator== (const Iterator &it) const
 Compare equality of iterators. More...
 
bool operator!= (const Iterator &it) const
 Compare inequality of iterators. More...
 
const_reference operator* () const
 Dereference. More...
 
const_pointer operator-> () const
 Dereference. More...
 
Iteratoroperator++ ()
 Prefix increment, i.e., ++iterator. More...
 
Iteratoroperator++ (int)
 Postfix increment, i.e., iterator++. More...
 

Protected Attributes

ordinal_type max_order
 Maximum order of iterator. More...
 
multiindex_type index
 Current value of iterator. More...
 
ordinal_type dim
 Dimension. More...
 
Teuchos::Array< ordinal_typeorders
 Maximum orders for each term to determine how to increment. More...
 

Detailed Description

template<typename ordinal_t>
class Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator

Iterator class for iterating over elements of the index set.

Definition at line 249 of file Stokhos_ProductBasisUtils.hpp.

Member Typedef Documentation

template<typename ordinal_t>
typedef std::iterator<std::input_iterator_tag,multiindex_type> Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::base_type

Definition at line 253 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
typedef base_type::iterator_category Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::iterator_category

Definition at line 254 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
typedef base_type::value_type Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::value_type

Definition at line 255 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
typedef base_type::difference_type Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::difference_type

Definition at line 256 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
typedef base_type::reference Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::reference

Definition at line 257 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
typedef base_type::pointer Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::pointer

Definition at line 258 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
typedef const multiindex_type& Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::const_reference

Definition at line 260 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
typedef const multiindex_type* Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::const_pointer

Definition at line 261 of file Stokhos_ProductBasisUtils.hpp.

Constructor & Destructor Documentation

template<typename ordinal_t>
Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::Iterator ( ordinal_type  max_order_,
const multiindex_type index_ 
)
inline

Constructor.

max_order_ is the maximum order of the set (inclusive) and index_ is the starting multi-index.

Definition at line 268 of file Stokhos_ProductBasisUtils.hpp.

Member Function Documentation

template<typename ordinal_t>
bool Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::operator== ( const Iterator it) const
inline

Compare equality of iterators.

Definition at line 277 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
bool Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::operator!= ( const Iterator it) const
inline

Compare inequality of iterators.

Definition at line 280 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
const_reference Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::operator* ( ) const
inline

Dereference.

Definition at line 283 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
const_pointer Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::operator-> ( ) const
inline

Dereference.

Definition at line 286 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
Iterator& Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::operator++ ( void  )
inline

Prefix increment, i.e., ++iterator.

No particular ordering of the indices is guaranteed. The current implementation produces multi-indices sorted lexographically backwards among the elements, e.g., [0 0], [1 0], [2 0], ... [0 1], [1 1], [2 1], ... but one shouldn't assume that. To obtain a specific ordering, one should implement a "less" functional and put the indices in a sorted container such as std::map<>.

Definition at line 298 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
Iterator& Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::operator++ ( int  )
inline

Postfix increment, i.e., iterator++.

Definition at line 313 of file Stokhos_ProductBasisUtils.hpp.

Member Data Documentation

template<typename ordinal_t>
ordinal_type Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::max_order
protected

Maximum order of iterator.

Definition at line 322 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
multiindex_type Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::index
protected

Current value of iterator.

Definition at line 325 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
ordinal_type Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::dim
protected

Dimension.

Definition at line 328 of file Stokhos_ProductBasisUtils.hpp.

template<typename ordinal_t>
Teuchos::Array<ordinal_type> Stokhos::TotalOrderIndexSet< ordinal_t >::Iterator::orders
protected

Maximum orders for each term to determine how to increment.

Definition at line 331 of file Stokhos_ProductBasisUtils.hpp.


The documentation for this class was generated from the following file: