Minimize a subject to a set of constraints. Based on the SQUAW algorithm. More...
#include <Chisq_Constrainer.h>
Public Member Functions | |
Chisq_Constrainer (const Chisq_Constrainer_Args &args) | |
virtual double | fit (Constraint_Calculator &constraint_calculator, const Column_Vector &xm, Column_Vector &x, const Column_Vector &ym, Column_Vector &y, const Matrix &G_i, const Diagonal_Matrix &Y, Column_Vector &pullx, Column_Vector &pully, Matrix &Q, Matrix &R, Matrix &S) |
virtual std::ostream & | print (std::ostream &s) const |
Print the state of this instance of Chisq_Constrainer. More... | |
virtual | ~Chisq_Constrainer () |
Public Member Functions inherited from hitfit::Base_Constrainer | |
Base_Constrainer (const Base_Constrainer_Args &args) | |
virtual | ~Base_Constrainer () |
Private Attributes | |
const Chisq_Constrainer_Args | _args |
Additional Inherited Members | |
Protected Member Functions inherited from hitfit::Base_Constrainer | |
bool | call_constraint_fcn (Constraint_Calculator &constraint_calculator, const Column_Vector &x, const Column_Vector &y, Row_Vector &F, Matrix &Bx, Matrix &By) const |
Helper function to evaluate constraints. This takes care of checking what the user function returns againts numerical derivatives, it that was requested. More... | |
Minimize a subject to a set of constraints. Based on the SQUAW algorithm.
Definition at line 252 of file Chisq_Constrainer.h.
hitfit::Chisq_Constrainer::Chisq_Constrainer | ( | const Chisq_Constrainer_Args & | args | ) |
Constructor. Create an instance of Chisq_Constrainer from a Chisq_Constrainer_Args object.
args | The parameter settings for this instance. |
Definition at line 307 of file Chisq_Constrainer.cc.
|
inlinevirtual |
Destructor.
Definition at line 274 of file Chisq_Constrainer.h.
|
virtual |
@ brief Do a constrained fit. Call the number of well-measured variables Nw, the number of poorly-measured variables Np, and the number of constraints Nc.
constraint_calculator | The object that will be used to evaluate the constraints. |
xm | Measured values of the well-measured variables, has dimension Nw. |
x | Before the fit: starting value of the well-measured variables for the fit, has dimension Nw. After the fit: final values of the well-measured variables. |
ym | Measured values of the poorly-measured variables, has dimension Np. |
y | Before the fit: starting value of the poorly-measured variables for the fit, has dimension Np. After the fit: final values of the poorly-measured variables. |
G_i | Error matrix for the well-measured variables, has dimension Nw,Nw. |
Y | Inverse error matrix for the poorly-measured variables, has dimension Np,Np. |
pullx | Pull quantities for the well-measured variables, has dimension Nw. |
pully | Pull quantities for the poorly-measured variables, has dimension Np. |
Q | Error matrix for the well-measured variables, has dimension Nw,Nw. |
R | Error matrix for the poorly-measured variables, has dimension Np,Np. |
S | Error matrix for the correlation between well-measured variables and poorly-measured variables, has dimension Nw,Np. |
cout << "singular matrix!";
Implements hitfit::Base_Constrainer.
Definition at line 320 of file Chisq_Constrainer.cc.
|
virtual |
Print the state of this instance of Chisq_Constrainer.
s | The output stream to which the output is sent. |
Reimplemented from hitfit::Base_Constrainer.
Definition at line 673 of file Chisq_Constrainer.cc.
|
private |
Parameter settings for this instance of Chisq_Constrainer.
Definition at line 376 of file Chisq_Constrainer.h.