ObjCryst++
1.5CVS
|
Simple Regularization Operator for the Least-Squares Refinement. More...
Public Member Functions | |
LSQRegularizationOperator (std::string objName="Unnamed LSQ Regularization Obj") | |
Constructor. | |
LSQRegularizationOperator (const LSQRegularizationOperator &) | |
Copy constructor. | |
~LSQRegularizationOperator () | |
Descructor. | |
const string & | GetClassName () const |
Name for this class ("LSQRegularizationOperator",...) | |
const string & | GetName () const |
Name of the object. | |
const CrystMatrix_REAL & | GetRegularizationOperatorMatrix () const |
Get the matrix reprezenting the regularization operator. | |
const std::vector< const RefinablePar * > & | GetParamList () const |
Get the list of parameters. This list links the matrix elements with the appropriate parameters. | |
REAL | GetRegularizationOperatorWeight () const |
Get the weighting factor of the regularization operator in the minimized ChiSq quantity. | |
void | SetRegularizationOperatorMatrix (const CrystMatrix_REAL &matrix) |
Set the matrix reprezenting the regularization operator. | |
void | SetParamList (const std::vector< const RefinablePar * > ¶mList) |
Set the list of parameters on which the operator is working. This list links the matrix elements with the appropriate parameters. | |
void | SetRegularizationOperatorWeight (const REAL Lambda) |
Set the weighting factor of the regularization operator in the minimized ChiSq quantity. | |
REAL | GetValue () const |
Get (non-weighted) value of Regularization Operator applied to the current parameters set. |
Private Attributes | |
std::string | mName |
Name of the object. | |
std::vector< const RefinablePar * > | mParamList |
List of parameters on which the regularization operator is working. | |
CrystMatrix_REAL | mRegOpMatrix |
Regularization operator matrix. | |
REAL | mLambda |
Weight of the regularization operator. |
Simple Regularization Operator for the Least-Squares Refinement.
During the common LSQ refinement a ChiSq value representing the difference of observed and simulated data is minimized. The matter of this object is to provide an operator that is used to regularize refinement solution in some way. For example it is assumed that the solution should be smooth. This means a that each model parameter from a given group of parametres, representing e.g. a continous function, should not differ much from neighbouring parameters in the group. Such a condition can be expressed as an additional operator that should be optimised. Hence insteed of minimizing only the ChiSq value the quantity: ChiSq(a0+da) + Lambda * (a0+da)*H*(a0+da)
is minimised now. Here a0 ... states for a vector of model parameters, da ... is the mutation of model parameters refined by LSQs, Lambda ... is the weighting factor and H ... is the symmetric regularization operator.
const CrystMatrix_REAL& ObjCryst::LSQRegularizationOperator::GetRegularizationOperatorMatrix | ( | ) | const |
Get the matrix reprezenting the regularization operator.
The elements of the matrix descibe relations between parameters returned by GetParamsList(). Hence this list defines the order of matrix rows and columns.
The matrix is symmetric. The lower triangular part of the matrix should be used preferably (becouse of compatibility with Newmat).
void ObjCryst::LSQRegularizationOperator::SetRegularizationOperatorMatrix | ( | const CrystMatrix_REAL & | matrix | ) |
Set the matrix reprezenting the regularization operator.
The elements of the matrix descibe relations between parameters returned by GetParamsList(). Hence this list defines the order of matrix rows and columns.
The matrix must be symmetric. The lower triangular part of the matrix should be used preferably (becouse of compatibility with Newmat).