ReFRACtor
|
A common way to create a perturbation 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_perturbation.h>
Public Member Functions | |
virtual | ~CompositePerturbation () |
void | add_builder (const boost::shared_ptr< PerturbationBuilder > &B) |
Add a builder to the build list. More... | |
int | number_element () const |
Number of elements that will be in the state vector. More... | |
virtual blitz::Array< double, 1 > | perturbation () const |
Return the perturbation vector to use. More... | |
virtual void | print (std::ostream &Os) const |
Print description of object. More... | |
std::string | print_to_string () const |
Print to string. More... | |
void | remove_builder (const boost::shared_ptr< PerturbationBuilder > &B) |
Remove a builder to the build list. More... | |
A common way to create a perturbation 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 PerturbationBuilder classes are the "Builder" classes.
Note that the PerturbationBuilder objects are called in the order they are added to the CompositePerturbation object. A common PerturbationBuilder adds additional values to the end state vector, so the order is important.
Definition at line 70 of file composite_perturbation.h.
|
inlinevirtual |
Definition at line 72 of file composite_perturbation.h.
|
inline |
Add a builder to the build list.
Definition at line 80 of file composite_perturbation.h.
int CompositePerturbation::number_element | ( | ) | const |
Number of elements that will be in the state vector.
Definition at line 10 of file composite_perturbation.cc.
|
virtual |
Return the perturbation vector to use.
Implements FullPhysics::Perturbation.
Definition at line 22 of file composite_perturbation.cc.
|
virtual |
Print description of object.
Reimplemented from FullPhysics::Perturbation.
Definition at line 37 of file composite_perturbation.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.
|
inline |
Remove a builder to the build list.
Definition at line 90 of file composite_perturbation.h.