ReFRACtor
initial_guess_value.h
Go to the documentation of this file.
1 #ifndef INITIAL_GUESS_VALUE_H
2 #define INITIAL_GUESS_VALUE_H
4 
5 namespace FullPhysics {
6 /****************************************************************/
15 public:
16  virtual ~InitialGuessValue() {}
17  virtual int number_element() const { return apriori_.rows(); }
18  virtual void build_initial_value(blitz::Array<double, 1>& v, int index)
19  const;
20  virtual void build_apriori(blitz::Array<double, 1>& v, int index) const;
21  virtual void build_apriori_covariance(blitz::Array<double, 2>& m,
22  int index) const;
23 
24 //-----------------------------------------------------------------------
26 //-----------------------------------------------------------------------
27 
28  const blitz::Array<double, 1>& apriori() const {return apriori_;}
29 
30 //-----------------------------------------------------------------------
32 //-----------------------------------------------------------------------
33 
34  void apriori(const blitz::Array<double, 1>& v) {apriori_.reference(v.copy());}
35 
36  void apriori_subset(const blitz::Array<bool, 1>& Flag,
37  const blitz::Array<double, 1>& V);
38  void initial_guess_subset(const blitz::Array<bool, 1>& Flag,
39  const blitz::Array<double, 1>& V);
40  void apriori_covariance_subset(const blitz::Array<bool, 1>& Flag,
41  const blitz::Array<double, 2>& V);
42 
43 //-----------------------------------------------------------------------
45 //-----------------------------------------------------------------------
46 
47  const blitz::Array<double, 2>& apriori_covariance() const
48  {return apriori_covariance_;}
49 
50 //-----------------------------------------------------------------------
52 //-----------------------------------------------------------------------
53 
54  void apriori_covariance(const blitz::Array<double, 2>& m)
55  {apriori_covariance_.reference(m.copy());}
56 
57 //-----------------------------------------------------------------------
59 //-----------------------------------------------------------------------
60 
61  const blitz::Array<double, 1>& initial_guess() const
62  {
63  if(initial_guess_.rows() > 0)
64  return initial_guess_;
65  else
66  return apriori_;
67  }
68 
69 //-----------------------------------------------------------------------
71 //-----------------------------------------------------------------------
72 
73  void initial_guess(const blitz::Array<double, 1>& v)
74  {initial_guess_.reference(v.copy());}
75 
76  virtual void print(std::ostream& Os) const;
77 
78 private:
79  blitz::Array<double, 1> apriori_, initial_guess_;
80  blitz::Array<double, 2> apriori_covariance_;
81 };
82 }
83 #endif
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.
void apriori_covariance_subset(const blitz::Array< bool, 1 > &Flag, const blitz::Array< double, 2 > &V)
Subset a value to include only those elements where Flag is true.
virtual void print(std::ostream &Os) const
Class that builds a portion of the state vector.
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.
This is a simple implementation of InitialGuessBuilder that just has variables used to give the aprio...
const Unit m("m", 1.0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
const blitz::Array< double, 2 > & apriori_covariance() const
Apriori covariance value.
void apriori_covariance(const blitz::Array< double, 2 > &m)
Set apriori covariance value.
virtual int number_element() const
Number of elements we will be adding to the state vector.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
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...
void apriori(const blitz::Array< double, 1 > &v)
Set apriori value.
void apriori_subset(const blitz::Array< bool, 1 > &Flag, const blitz::Array< double, 1 > &V)
Subset a value to include only those elements where Flag is true.
void initial_guess_subset(const blitz::Array< bool, 1 > &Flag, const blitz::Array< double, 1 > &V)
Subset a value to include only those elements where Flag is true.
const blitz::Array< double, 1 > & apriori() const
Apriori value.
void initial_guess(const blitz::Array< double, 1 > &v)
Set first guess value.
const blitz::Array< double, 1 > & initial_guess() const
First guess value.

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:08