24 #include "../Atomicrex.h" 25 #include "../job/FitObject.h" 26 #include "../util/xml/XMLUtilities.h" 108 double _tolerance = 1.0;
143 operator double()
const {
return _computedValue; }
195 virtual void compute()
override;
FitProperty()
Default constructor.
Definition: FitProperty.h:53
ScalarFitProperty(const FPString &id, const FPString &units, FitJob *job)
Initialization constructor.
Definition: FitProperty.h:134
double absoluteWeight() const
Returns the absolute fit weight assigned to this object.
Definition: FitProperty.h:81
Indicates that the norm selected by the user should be used.
Definition: FitProperty.h:44
double _absoluteWeight
The weight factor which is applied to the residual.
Definition: FitProperty.h:103
void setFitEnabled(bool enable)
Sets whether this object and it's children are included in the fit.
Definition: FitObject.h:127
FitProperty(const FPString &id, const FPString &units, FitJob *job)
Initialization constructor.
Definition: FitProperty.h:56
bool _outputEnabled
Definition: FitObject.h:170
ResidualNorm residualNorm() const
Returns how residual contributions are calculated by this property.
Definition: FitProperty.h:90
double _targetValue
The target value for the property.
Definition: FitProperty.h:171
void setTargetValue(double targetValue)
Sets target value.
Definition: FitProperty.h:162
virtual void parse(XML::Element propertyElement) override
Parse the contents of the <property> element in the job file.
Definition: FitProperty.cpp:126
FPString _units
The units of this property.
Definition: FitProperty.h:116
void setOutputEnabled(bool enable)
Definition: FitObject.h:135
double _computedValue
The computed value of the property.
Definition: FitProperty.h:168
ScalarFitProperty & operator=(double value)
Assigns a new value to the property.
Definition: FitProperty.h:148
Definition: FitProperty.h:38
void assignAbsoluteWeights(double absoluteWeight) override
Recursively assigns absolute weights to the properties.
Definition: FitProperty.h:78
Definition: FitProperty.h:184
void setTolerance(double tolerance)
Sets the tolerance assigned to this fit property.
Definition: FitProperty.h:87
void initialize(const FPString &id, const FPString &units, FitJob *job)
Initializes the property object. This method must be called if the default constructor has been used...
Definition: FitProperty.h:137
double computedValue() const
Getter for _computedValue since double() operator was hard to interface.
Definition: FitProperty.h:146
ResidualNorm _residualNorm
Specifies how residual contributions are calculated.
Definition: FitProperty.h:113
virtual void print(MsgLogger &stream) override
Outputs the current value of the property.
Definition: FitProperty.h:72
This file collects the definition of classes that define various simple crystal structures.
Definition: Atomicrex.h:67
A simple scalar degree of freedom that consists of a single value.
Definition: DegreeOfFreedom.h:169
virtual void compute()
Lets the property object compute the current value of the property.
Definition: FitProperty.h:75
std::string FPString
The default string type used throughout the code:
Definition: Atomicrex.h:70
ScalarDOF & dof() const
Returns the degree of freedom to which this property is coupled.
Definition: FitProperty.h:192
void initialize(const FPString &id, const FPString &units, FitJob *job)
Initializes the property object. This method must be called if the default constructor was used to cr...
Definition: FitProperty.cpp:35
Definition: XMLUtilities.h:69
Definition: FitObject.h:42
L2 norm, use square of difference from target value divided by target value.
Definition: FitProperty.h:46
bool shouldCompute(bool isFitting) const
Returns whether this property should be computed because it is included in the fit and/or in the outp...
Definition: FitProperty.h:69
FitJob * job() const
Returns a pointer to the job to which this object belongs.
Definition: FitObject.h:150
L2 norm, use squared difference from target value.
Definition: FitProperty.h:45
const FPString & units() const
Returns the units of this property.
Definition: FitProperty.h:93
double targetValue()
Returns target value (scalar)
Definition: FitProperty.h:159
virtual double residual(ResidualNorm norm) const =0
Returns the residual of this property used for fitting.
Definition: FitProperty.h:126
ResidualNorm
Specifies how residual contributions are calculated.
Definition: FitProperty.h:43
ScalarFitProperty()
Default constructor.
Definition: FitProperty.h:131
double tolerance() const
Returns the tolerance assigned to this fit property.
Definition: FitProperty.h:84
L1 norm, absolute value of difference from target value.
Definition: FitProperty.h:47
bool _fitEnabled
Controls whether this object and it's children are included in the fit.
Definition: FitObject.h:166