IterationPack: General framework for building iterative algorithms  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
IterationPack::AlgorithmTracker Class Reference

Used to ouput iteration results and other information. More...

#include <IterationPack_AlgorithmTracker.hpp>

Inheritance diagram for IterationPack::AlgorithmTracker:
Inheritance graph
[legend]

Public Member Functions

virtual ~AlgorithmTracker ()
 

Public types

typedef Teuchos::RCP
< std::ostream > 
ostream_ptr_t
 

Constructors

 AlgorithmTracker (const ostream_ptr_t &journal_out)
 Construct with an output stream for journal_out. More...
 

Algorithm iteration state notification

virtual void initialize ()
 Reinitialize the track object right before it is used. More...
 
virtual void output_iteration (const Algorithm &algo) const
 Output information about an iteration just completed. More...
 
virtual void output_final (const Algorithm &algo, EAlgoReturn algo_return) const
 Output information about a just completed algorithm. More...
 

Journal file access

virtual void set_journal_out (const ostream_ptr_t &journal_out)
 Set a smart pointer to the journal file. More...
 
const ostream_ptr_tget_journal_out () const
 Get the smart pointer to the journal file. More...
 
virtual std::ostream & journal_out () const
 Return a reference to a std::ostream to be used to output debug information and the like. More...
 

Detailed Description

Used to ouput iteration results and other information.

This interface can be implemented by outside clients of an iterative algorithm to monitor or "track" the progress of the algorithm.

ToDo: Write more documentation!

Definition at line 59 of file IterationPack_AlgorithmTracker.hpp.

Member Typedef Documentation

Definition at line 69 of file IterationPack_AlgorithmTracker.hpp.

Constructor & Destructor Documentation

virtual IterationPack::AlgorithmTracker::~AlgorithmTracker ( )
inlinevirtual

Definition at line 63 of file IterationPack_AlgorithmTracker.hpp.

IterationPack::AlgorithmTracker::AlgorithmTracker ( const ostream_ptr_t journal_out)

Construct with an output stream for journal_out.

Preconditions:

  • journal_out.get() != NULL (throw std::invalid_argument).

Definition at line 46 of file IterationPack_AlgorithmTracker.cpp.

Member Function Documentation

void IterationPack::AlgorithmTracker::initialize ( )
virtual

Reinitialize the track object right before it is used.

The default implementation does nothing.

Reimplemented in IterationPack::AlgorithmTrackerComposite.

Definition at line 50 of file IterationPack_AlgorithmTracker.cpp.

void IterationPack::AlgorithmTracker::output_iteration ( const Algorithm algo) const
virtual

Output information about an iteration just completed.

The default just does nothing.

Reimplemented in IterationPack::AlgorithmTrackerComposite.

Definition at line 53 of file IterationPack_AlgorithmTracker.cpp.

void IterationPack::AlgorithmTracker::output_final ( const Algorithm algo,
EAlgoReturn  algo_return 
) const
virtual

Output information about a just completed algorithm.

The default just does nothing.

Reimplemented in IterationPack::AlgorithmTrackerComposite.

Definition at line 56 of file IterationPack_AlgorithmTracker.cpp.

void IterationPack::AlgorithmTracker::set_journal_out ( const ostream_ptr_t journal_out)
virtual

Set a smart pointer to the journal file.

Definition at line 59 of file IterationPack_AlgorithmTracker.cpp.

const AlgorithmTracker::ostream_ptr_t & IterationPack::AlgorithmTracker::get_journal_out ( ) const

Get the smart pointer to the journal file.

Definition at line 65 of file IterationPack_AlgorithmTracker.cpp.

std::ostream & IterationPack::AlgorithmTracker::journal_out ( ) const
virtual

Return a reference to a std::ostream to be used to output debug information and the like.

Definition at line 71 of file IterationPack_AlgorithmTracker.cpp.


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