IterationPack::IterQuantityAccessContiguous< T_info > Class Template Reference

Iteration Quanities subclass for contiguous iterations. More...

#include <IterationPack_IterQuantityAccessContiguousDecl.hpp>

Inheritance diagram for IterationPack::IterQuantityAccessContiguous< T_info >:

Inheritance graph
[legend]
List of all members.

Constructors/initalizers

 IterQuantityAccessContiguous (int num_quantities, const std::string &name, const abstract_factory_ptr_t &abstract_factory=Teuchos::rcp(new abstract_factory_std_t()))
 Construct storage for num_quantities with the name name given an abstract factory.
void set_factory (const abstract_factory_ptr_t &abstract_factory)
 Set the abstract factory to use to allocate storate.
void resize (int num_quantities)
 Resize the number of contiguous storage locations.
 ~IterQuantityAccessContiguous ()
 

Access

int num_quantities () const
 Return the number of continous storage locations.

Overridden from IterQuantity

IterQuantityclone () const
 
const char * name () const
 
bool has_storage_k (int offset) const
 
bool updated_k (int offset) const
 
int last_updated () const
 
void set_not_updated_k (int offset)
 
void set_all_not_updated ()
 
bool will_loose_mem (int offset, int set_offset) const
 
void next_iteration ()
 
void print_concrete_type (std::ostream &out) const
 

Overridden from IterQuantityAccess

T_info & get_k (int offset)
 
const T_info & get_k (int offset) const
 
T_info & set_k (int offset)
 
T_info & set_k (int set_offset, int get_offset)
 

Public Types

typedef IterQuantityAccess<
T_info > 
base_t
 
typedef Teuchos::RCP< const
Teuchos::AbstractFactory<
T_info > > 
abstract_factory_ptr_t
 
typedef Teuchos::AbstractFactoryStd<
T_info, T_info > 
abstract_factory_std_t
 

Detailed Description

template<class T_info>
class IterationPack::IterQuantityAccessContiguous< T_info >

Iteration Quanities subclass for contiguous iterations.

This class implements the IterQuantityAccess interface for the case where storage is provided for consecutive iterations. This class allows the number of iterations to be variable on construction. For 3 storage locations, this class could provide memory for the intervals [k-5, k-4, k-3], or [k-1, k, k+1] or [k+1, k+2, k+3] etc. The particular interval being represented is dependent on the sequence in which set_k(offset) and next_iteration() are called. The only rule is that backward interation is not allowed. For example, if the [k, k+1] interval is being represented then set_k(-1) will throw an exception but set_k(+5) would not. Backward memory is keep as long as possible and is only changed by set_k(). For example, if the range [k-1, k] is being represented and set_k(+1) is called, the interval [k, k+1] is now represented and the value for the kth iteration is still keep but the value for the k-1 iteration is lost. This could have been determined a priori by calling will_loose_mem().

The default constructor, copy constructor and assignment operators are not not allowed (i.e. declared private).

Definition at line 73 of file IterationPack_IterQuantityAccessContiguousDecl.hpp.


Member Typedef Documentation

template<class T_info>
typedef IterQuantityAccess<T_info> IterationPack::IterQuantityAccessContiguous< T_info >::base_t

Definition at line 77 of file IterationPack_IterQuantityAccessContiguousDecl.hpp.

template<class T_info>
typedef Teuchos::RCP< const Teuchos::AbstractFactory<T_info> > IterationPack::IterQuantityAccessContiguous< T_info >::abstract_factory_ptr_t

Definition at line 81 of file IterationPack_IterQuantityAccessContiguousDecl.hpp.

template<class T_info>
typedef Teuchos::AbstractFactoryStd<T_info,T_info> IterationPack::IterQuantityAccessContiguous< T_info >::abstract_factory_std_t

Definition at line 83 of file IterationPack_IterQuantityAccessContiguousDecl.hpp.


Constructor & Destructor Documentation

template<class T_info>
IterationPack::IterQuantityAccessContiguous< T_info >::IterQuantityAccessContiguous ( int  num_quantities,
const std::string &  name,
const abstract_factory_ptr_t abstract_factory = Teuchos::rcp(new abstract_factory_std_t()) 
)

Construct storage for num_quantities with the name name given an abstract factory.

After construction this->set_k(offset) can be called for any offset in the range of legal integers.

Preconditions:

If abstract_factory.get() == NULL then the client had better call this->set_factory() with an non-NULL factory before any attempt is made to call get_k() or set_k() or an exception will be thrown.

Definition at line 46 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
IterationPack::IterQuantityAccessContiguous< T_info >::~IterQuantityAccessContiguous (  ) 

Definition at line 60 of file IterationPack_IterQuantityAccessContiguousDef.hpp.


Member Function Documentation

template<class T_info>
void IterationPack::IterQuantityAccessContiguous< T_info >::set_factory ( const abstract_factory_ptr_t abstract_factory  ) 

Set the abstract factory to use to allocate storate.

Postconditions:

If abstract_factory.get() == NULL then the client had better call this->set_factory() again later with a non-NULL factory before any attempt is made to call get_k() or set_k() or an exception will be thrown.

Definition at line 65 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
void IterationPack::IterQuantityAccessContiguous< T_info >::resize ( int  num_quantities  ) 

Resize the number of contiguous storage locations.

Postconditions:

Definition at line 79 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
int IterationPack::IterQuantityAccessContiguous< T_info >::num_quantities (  )  const [inline]

Return the number of continous storage locations.

Definition at line 245 of file IterationPack_IterQuantityAccessContiguousDecl.hpp.

template<class T_info>
IterQuantity * IterationPack::IterQuantityAccessContiguous< T_info >::clone (  )  const [virtual]

Implements IterationPack::IterQuantity.

Definition at line 93 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
const char * IterationPack::IterQuantityAccessContiguous< T_info >::name (  )  const [virtual]

Implements IterationPack::IterQuantity.

Definition at line 101 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
bool IterationPack::IterQuantityAccessContiguous< T_info >::has_storage_k ( int  offset  )  const [virtual]

Implements IterationPack::IterQuantity.

Definition at line 106 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
bool IterationPack::IterQuantityAccessContiguous< T_info >::updated_k ( int  offset  )  const [virtual]

Implements IterationPack::IterQuantity.

Definition at line 113 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
int IterationPack::IterQuantityAccessContiguous< T_info >::last_updated (  )  const [virtual]

Implements IterationPack::IterQuantity.

Definition at line 122 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
void IterationPack::IterQuantityAccessContiguous< T_info >::set_not_updated_k ( int  offset  )  [virtual]

Implements IterationPack::IterQuantity.

Definition at line 137 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
void IterationPack::IterQuantityAccessContiguous< T_info >::set_all_not_updated (  )  [virtual]

Implements IterationPack::IterQuantity.

Definition at line 143 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
bool IterationPack::IterQuantityAccessContiguous< T_info >::will_loose_mem ( int  offset,
int  set_offset 
) const [virtual]

Implements IterationPack::IterQuantity.

Definition at line 149 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
void IterationPack::IterQuantityAccessContiguous< T_info >::next_iteration (  )  [virtual]

Implements IterationPack::IterQuantity.

Definition at line 155 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
void IterationPack::IterQuantityAccessContiguous< T_info >::print_concrete_type ( std::ostream &  out  )  const [virtual]

Implements IterationPack::IterQuantity.

Definition at line 162 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
T_info & IterationPack::IterQuantityAccessContiguous< T_info >::get_k ( int  offset  )  [virtual]

Implements IterationPack::IterQuantityAccess< T_info >.

Definition at line 176 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
const T_info & IterationPack::IterQuantityAccessContiguous< T_info >::get_k ( int  offset  )  const [virtual]

Implements IterationPack::IterQuantityAccess< T_info >.

Definition at line 181 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
T_info & IterationPack::IterQuantityAccessContiguous< T_info >::set_k ( int  offset  )  [virtual]

Implements IterationPack::IterQuantityAccess< T_info >.

Definition at line 187 of file IterationPack_IterQuantityAccessContiguousDef.hpp.

template<class T_info>
T_info & IterationPack::IterQuantityAccessContiguous< T_info >::set_k ( int  set_offset,
int  get_offset 
) [virtual]

Implements IterationPack::IterQuantityAccess< T_info >.

Definition at line 252 of file IterationPack_IterQuantityAccessContiguousDef.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:50:29 2010 for IterationPack: General framework for building iterative algorithms by  doxygen 1.4.7