21 const blitz::Array<double, 2>& a_priori_cov)
22 : Xa(a_priori_params.copy()), Sa(a_priori_cov.copy())
25 throw Exception(
"The size of the a priori parameter values array is zero.");
26 if(
Sa.rows() !=
Sa.cols() )
27 throw Exception(
"The a priori covariance matrix must be a square matrix.");
28 if(
Sa.rows() !=
Xa.rows() )
29 throw Exception(
"The number of rows and columns of a priori covariance matrix must equal the size of the a priori parameter values array.");
38 firstIndex i1; secondIndex i2;
93 firstIndex i1; secondIndex i2; thirdIndex i3;
101 return Array<double, 1>(sqrt(
Sa(i1,i1)));
virtual blitz::Array< double, 2 > weighted_jacobian_aug()
Returns the matrix returned by uncert_weighted_jacobian() augmented at the bottom by the matrix retur...
virtual blitz::Array< double, 1 > model_measure_diff()
Returns model and measurement difference (model - measurement)
virtual blitz::Array< double, 2 > uncert_weighted_jac_inner_product()
Returns the inner product of the matrix returned by the method uncert_weighted_jacobian() by itself...
blitz::Array< double, 2 > Sa_chol_inv
virtual blitz::Array< double, 1 > cov_weighted_parameter_a_priori_diff() const
Returns the current parameters value and their a priori value difference (current param - a priori pa...
virtual blitz::Array< double, 1 > uncert_weighted_model_measure_diff()
Returns model and measurement difference weighted by the inverse of the Cholesky decomposition of the...
virtual blitz::Array< double, 1 > model_measure_diff_aug()
Returns the vector returned by model_measure_diff() augmented at the bottom by the vector returned by...
virtual int parameter_size() const
Returns the size of the parameters.
This is the base of the exception hierarchy for Full Physics code.
blitz::Array< double, 2 > cholesky_decomposition(const blitz::Array< double, 2 > &A)
This calculates the Cholesky Decompostion of A so that A = L L^T.
virtual blitz::Array< double, 2 > uncert_weighted_jacobian()
Returns the model Jacobian weighted by the inverse of the Cholesky decomposition of the error covaria...
MaxAPosteriori(const blitz::Array< double, 1 > &a_priori_params, const blitz::Array< double, 2 > &a_priori_cov)
Constructor.
virtual blitz::Array< double, 1 > weighted_model_measure_diff_aug()
Returns the vector returned by uncert_weighted_model_measure_diff() augmented at the bottom by the ve...
blitz::Array< double, 2 > Sa
#define REGISTER_LUA_CLASS(X)
virtual int measurement_size() const
Returns the size of the measurement data vector.
Apply value function to a blitz array.
blitz::Array< double, 1 > Xa
virtual blitz::Array< double, 2 > a_posteriori_covariance()
Returns a-posteriori covariance matrix.
blitz::Array< double, 2 > multifit_covar(const blitz::Array< double, 2 > &J, double Eps_rel=std::numeric_limits< double >::epsilon())
The base class for maximum a posteriori estimation.
blitz::Array< double, 2 > generalized_inverse(const blitz::Array< double, 2 > &A, double Rcond=std::numeric_limits< double >::epsilon())
This returns the generalized inverse of the given matrix.
virtual blitz::Array< double, 1 > parameter_a_priori_diff() const
Returns the current parameters value and their a priori value difference (current param - a priori pa...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
virtual blitz::Array< double, 1 > param_a_priori_uncertainty() const
Returns the square root of the diagonal of the a-priori covariance matrix.
virtual blitz::Array< double, 1 > param_a_posteriori_uncertainty()
Returns the square root of the diagonal of the a-posteriori covariance matrix.
blitz::Array< double, 2 > Sa_chol
virtual blitz::Array< double, 2 > averaging_kernel()
Returns the averaging kernel matrix.