Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ObjCryst::LSQNumObj Class Reference

(Quick & dirty) Least-Squares Refinement Object with Numerical derivatives More...

Collaboration diagram for ObjCryst::LSQNumObj:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LSQNumObj (std::string objName="Unnamed LSQ object")
 ~LSQNumObj ()
void SetParIsFixed (const std::string &parName, const bool fix)
 Fix one parameter.

void SetParIsFixed (const RefParType *type, const bool fix)
 Fix one family of parameters.

void UnFixAllPar ()
 UnFix All parameters.

void SetParIsUsed (const std::string &parName, const bool use)
 Set a parameter to be used.

void SetParIsUsed (const RefParType *type, const bool use)
 Set a family of parameters to be used.

void Refine (int nbCycle=1, bool useLevenbergMarquardt=false, const bool silent=false)
CrystVector_REAL Sigma () const
CrystMatrix_REAL CorrelMatrix () const
REAL Rfactor () const
REAL RwFactor () const
REAL ChiSquare () const
void SetRefinedObj (RefinableObj &obj, const unsigned int LSQFuncIndex=0)
 Add an object to refine.

void SetUseSaveFileOnEachCycle (bool yesOrNo=true)
void SetSaveFile (std::string fileName="refine.save")
void PrintRefResults () const
void SetDampingFactor (const REAL newDampFact)
void PurgeSaveFile ()
void WriteReportToFile () const
void OptimizeDerivativeSteps ()
const std::map< pair< const
RefinablePar *, const RefinablePar * >,
REAL > & 
GetVarianceCovarianceMap () const

Private Member Functions

void PrepareRefParList ()
 Prepare mRefParList for the refinement.


Private Attributes

ObjRegistry< RefinableObjmRecursiveRefinedObjList
 The recursive list of all refined sub-objects.

RefinableObj mRefParList
 The refinable par list used during refinement.

REAL mDampingFactor
 Damping factor for the refinement (unused yet...).

bool mSaveReportOnEachCycle
 Save result to file after each cycle ?

std::string mName
 Name of the refined object.

std::string mSaveFileName
 File name where refinement info is saved.

REAL mR
REAL mRw
REAL mChiSq
CrystMatrix_REAL mCorrelMatrix
 Correlation matrix between all refined parameters.

std::map< pair< const RefinablePar *,
const RefinablePar * >, REAL > 
mvVarCovar
 Variance-Covariance matrix, as a std::map.

CrystVector_REAL mObs
 Observed values.

CrystVector_REAL mWeight
 Weight corresponding to all observed values.

int mIndexValuesSetInitial
 Index of the set of saved values for all refinable parameters, before refinement and before the last cycle.

int mIndexValuesSetLast
 Index of the set of saved values for all refinable parameters, before refinement and before the last cycle.

bool mStopAfterCycle
 If true, then stop at the end of the cycle. Used in multi-threading environment.

RefinableObjmpRefinedObj
 The opitimized object.

unsigned int mLSQFuncIndex
 The index of the LSQ function in the refined object (if there are several...).


Detailed Description

(Quick & dirty) Least-Squares Refinement Object with Numerical derivatives

This is still highly experimental !


Constructor & Destructor Documentation

ObjCryst::LSQNumObj::LSQNumObj std::string  objName = "Unnamed LSQ object"  ) 
 

ObjCryst::LSQNumObj::~LSQNumObj  ) 
 


Member Function Documentation

REAL ObjCryst::LSQNumObj::ChiSquare  )  const
 

CrystMatrix_REAL ObjCryst::LSQNumObj::CorrelMatrix  )  const
 

const std::map<pair<const RefinablePar*,const RefinablePar*>,REAL >& ObjCryst::LSQNumObj::GetVarianceCovarianceMap  )  const
 

void ObjCryst::LSQNumObj::OptimizeDerivativeSteps  ) 
 

void ObjCryst::LSQNumObj::PrepareRefParList  )  [private]
 

Prepare mRefParList for the refinement.

void ObjCryst::LSQNumObj::PrintRefResults  )  const
 

void ObjCryst::LSQNumObj::PurgeSaveFile  ) 
 

void ObjCryst::LSQNumObj::Refine int  nbCycle = 1,
bool  useLevenbergMarquardt = false,
const bool  silent = false
 

REAL ObjCryst::LSQNumObj::Rfactor  )  const
 

REAL ObjCryst::LSQNumObj::RwFactor  )  const
 

void ObjCryst::LSQNumObj::SetDampingFactor const REAL  newDampFact  ) 
 

void ObjCryst::LSQNumObj::SetParIsFixed const RefParType type,
const bool  fix
 

Fix one family of parameters.

void ObjCryst::LSQNumObj::SetParIsFixed const std::string &  parName,
const bool  fix
 

Fix one parameter.

void ObjCryst::LSQNumObj::SetParIsUsed const RefParType type,
const bool  use
 

Set a family of parameters to be used.

void ObjCryst::LSQNumObj::SetParIsUsed const std::string &  parName,
const bool  use
 

Set a parameter to be used.

void ObjCryst::LSQNumObj::SetRefinedObj RefinableObj obj,
const unsigned int  LSQFuncIndex = 0
 

Add an object to refine.

void ObjCryst::LSQNumObj::SetSaveFile std::string  fileName = "refine.save"  ) 
 

void ObjCryst::LSQNumObj::SetUseSaveFileOnEachCycle bool  yesOrNo = true  ) 
 

CrystVector_REAL ObjCryst::LSQNumObj::Sigma  )  const
 

void ObjCryst::LSQNumObj::UnFixAllPar  ) 
 

UnFix All parameters.

void ObjCryst::LSQNumObj::WriteReportToFile  )  const
 


Member Data Documentation

REAL ObjCryst::LSQNumObj::mChiSq [private]
 

CrystMatrix_REAL ObjCryst::LSQNumObj::mCorrelMatrix [private]
 

Correlation matrix between all refined parameters.

REAL ObjCryst::LSQNumObj::mDampingFactor [private]
 

Damping factor for the refinement (unused yet...).

int ObjCryst::LSQNumObj::mIndexValuesSetInitial [private]
 

Index of the set of saved values for all refinable parameters, before refinement and before the last cycle.

int ObjCryst::LSQNumObj::mIndexValuesSetLast [private]
 

Index of the set of saved values for all refinable parameters, before refinement and before the last cycle.

unsigned int ObjCryst::LSQNumObj::mLSQFuncIndex [private]
 

The index of the LSQ function in the refined object (if there are several...).

std::string ObjCryst::LSQNumObj::mName [private]
 

Name of the refined object.

CrystVector_REAL ObjCryst::LSQNumObj::mObs [private]
 

Observed values.

RefinableObj* ObjCryst::LSQNumObj::mpRefinedObj [private]
 

The opitimized object.

REAL ObjCryst::LSQNumObj::mR [private]
 

ObjRegistry<RefinableObj> ObjCryst::LSQNumObj::mRecursiveRefinedObjList [private]
 

The recursive list of all refined sub-objects.

RefinableObj ObjCryst::LSQNumObj::mRefParList [mutable, private]
 

The refinable par list used during refinement.

Only a compilation of the parameters in RefinableObj and its sub-objects

REAL ObjCryst::LSQNumObj::mRw [private]
 

std::string ObjCryst::LSQNumObj::mSaveFileName [private]
 

File name where refinement info is saved.

bool ObjCryst::LSQNumObj::mSaveReportOnEachCycle [private]
 

Save result to file after each cycle ?

bool ObjCryst::LSQNumObj::mStopAfterCycle [private]
 

If true, then stop at the end of the cycle. Used in multi-threading environment.

std::map<pair<const RefinablePar*,const RefinablePar*>,REAL > ObjCryst::LSQNumObj::mvVarCovar [private]
 

Variance-Covariance matrix, as a std::map.

CrystVector_REAL ObjCryst::LSQNumObj::mWeight [private]
 

Weight corresponding to all observed values.


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:05:46 2006 for ObjCryst++ by doxygen 1.3.6