2 #include <boost/foreach.hpp> 15 Ig.
add_builder(boost::dynamic_pointer_cast<CompositeInitialGuess>(V));
20 Ig.
add_builder(boost::dynamic_pointer_cast<CompositeInitialGuess>(V));
26 .
def(luabind::constructor<>())
27 .
def("add_builder", &CompositeInitialGuess::add_builder)
28 .
def("add_builder", &composite_initial_guess_add_builder)
29 .
def("add_builder", &composite_initial_guess_add_builder2)
39 blitz::Array<double, 1> res(number_element());
42 v->build_initial_value(res, index);
43 index += v->number_element();
56 res += v->number_element();
66 blitz::Array<double, 1> res(number_element());
69 v->build_apriori(res, index);
70 index += v->number_element();
82 int n = number_element();
84 blitz::Array<double, 2> res(n,n,blitz::ColumnMajorArray<2>());
88 v->build_apriori_covariance(res, index);
89 index += v->number_element();
100 Os <<
"Composite Initial Guess";
104 (blitz::Array<double, 1>& v,
int index)
const 106 if(number_element() == 0)
108 v(Range(index, index + number_element() - 1)) = initial_guess();
112 (blitz::Array<double, 1>& v,
int index)
const 114 if(number_element() == 0)
116 v(Range(index, index + number_element() - 1)) = apriori();
120 (blitz::Array<double, 2>&
m,
int index)
const 122 if(number_element() == 0)
124 Range r(index, index + number_element() - 1);
125 m(r, r) = apriori_covariance();
virtual blitz::Array< double, 1 > initial_guess() const
Return the initial state vector to use.
void add_builder(const boost::shared_ptr< InitialGuessBuilder > &B)
Add a builder to the build list.
virtual blitz::Array< double, 1 > apriori() const
Return the apriori state vector to use.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
A common way to create an initial guess is to have other classes responsible for portions of the stat...
#define REGISTER_LUA_CLASS(X)
Apply value function to a blitz array.
Class that builds a portion of the state vector.
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.
const Unit m("m", 1.0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
virtual int number_element() const
Number of elements that will be in the state vector.
virtual void print(std::ostream &Os) const
Print description of object.
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.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
def(luabind::constructor< int >()) .def("rows"
This gets the initial guess and the apriori state vector values.
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 st...
virtual blitz::Array< double, 2 > apriori_covariance() const
Return the apriori state vector covariance to use.