ReFRACtor
|
A common way to create an initial guess is to have other classes responsible for portions of the state vector (e.g., an Atmosphere class creates the portion of the initial guess that handles the description of the atmosphere layers). More...
#include <composite_initial_guess.h>
Public Member Functions | |
virtual | ~CompositeInitialGuess () |
void | add_builder (const boost::shared_ptr< InitialGuessBuilder > &B) |
Add a builder to the build list. More... | |
virtual blitz::Array< double, 1 > | apriori () const |
Return the apriori state vector to use. More... | |
virtual blitz::Array< double, 2 > | apriori_covariance () const |
Return the apriori state vector covariance to use. More... | |
virtual void | attach_notify (CompositeInitialGuess &Comp_ig) |
Called when we get attached to a CompositeInitialGuess. More... | |
virtual void | build_apriori (blitz::Array< double, 1 > &v, int index) const |
Called when we need this class to do its part in setting up the apriori state vector. More... | |
virtual void | build_apriori_covariance (blitz::Array< double, 2 > &m, int index) const |
Called when we need this class to do its part in setting up the covariance matrix for the a priori state vector. More... | |
virtual void | build_initial_value (blitz::Array< double, 1 > &v, int index) const |
Called when we need this class to do its part in setting up the initial state vector. More... | |
virtual blitz::Array< double, 1 > | initial_guess () const |
Return the initial state vector to use. More... | |
virtual int | number_element () const |
Number of elements that will be in the state vector. More... | |
virtual void | print (std::ostream &Os) const |
Print description of object. More... | |
std::string | print_to_string () const |
Print to string. More... | |
std::string | print_to_string () const |
Print to string. More... | |
void | remove_builder (const boost::shared_ptr< InitialGuessBuilder > &B) |
Remove a builder to the build list. More... | |
A common way to create an initial guess is to have other classes responsible for portions of the state vector (e.g., an Atmosphere class creates the portion of the initial guess that handles the description of the atmosphere layers).
This class implements this division.
This is an example of the "Builder" design pattern. This class is what is commonly called the "Director", and the InitialGuessBuilder classes are the "Builder" classes.
Note that the InitialGuessBuilder objects are called in the order they are added to the CompositeInitialGuess object. A common InitialGuessBuilder adds additional values to the end state vector, so the order is important.
A CompositeInitialGuess is also a InitialGuessBuilder, so you can use this to nest initial guess builders.
Definition at line 102 of file composite_initial_guess.h.
|
inlinevirtual |
Definition at line 105 of file composite_initial_guess.h.
|
inline |
Add a builder to the build list.
Definition at line 122 of file composite_initial_guess.h.
|
virtual |
Return the apriori state vector to use.
Implements FullPhysics::InitialGuess.
Definition at line 64 of file composite_initial_guess.cc.
|
virtual |
Return the apriori state vector covariance to use.
Implements FullPhysics::InitialGuess.
Definition at line 79 of file composite_initial_guess.cc.
|
inlinevirtualinherited |
Called when we get attached to a CompositeInitialGuess.
The default is to do nothing, but derived classes can override this if desired.
Definition at line 28 of file composite_initial_guess.h.
|
virtual |
Called when we need this class to do its part in setting up the apriori state vector.
v | State vector that should be updated in place. |
index | Since we are often adding to the end of the state vector, index is passed in. This is the sum of the number_elements() of all the InitialGuessBuilder that appear before this object in the list. |
Implements FullPhysics::InitialGuessBuilder.
Definition at line 112 of file composite_initial_guess.cc.
|
virtual |
Called when we need this class to do its part in setting up the covariance matrix for the a priori state vector.
m | State vector that should be updated in place. |
index | Since we are often adding to the end of the state vector, index is passed in. This is the sum of the number_elements() of all the InitialGuessBuilder that appear before this object in the list. |
Implements FullPhysics::InitialGuessBuilder.
Definition at line 120 of file composite_initial_guess.cc.
|
virtual |
Called when we need this class to do its part in setting up the initial state vector.
v | State vector that should be updated in place. |
index | Since we are often adding to the end of the state vector, index is passed in. This is the sum of the number_elements() of all the InitialGuessBuilder that appear before this object in the list. |
Implements FullPhysics::InitialGuessBuilder.
Definition at line 104 of file composite_initial_guess.cc.
|
virtual |
Return the initial state vector to use.
Implements FullPhysics::InitialGuess.
Definition at line 37 of file composite_initial_guess.cc.
|
virtual |
Number of elements that will be in the state vector.
Implements FullPhysics::InitialGuessBuilder.
Definition at line 52 of file composite_initial_guess.cc.
|
virtual |
Print description of object.
Reimplemented from FullPhysics::InitialGuessBuilder.
Definition at line 98 of file composite_initial_guess.cc.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
|
inline |
Remove a builder to the build list.
Definition at line 132 of file composite_initial_guess.h.