69 bool test_different(
double a,
double b,
double c,
double eps)
101 : _test_gradient(defs.get_bool(
"test_gradient")),
102 _test_step(defs.get_float(
"test_step")),
103 _test_eps(defs.get_float(
"test_eps")) {}
141 : _nconstraints(nconstraints) {}
176 s <<
"Base_Constrainer parameters:\n";
236 bool val = constraint_calculator.eval(x, y,
F, Bx, By);
246 int Nw = x.num_row();
247 int Np = y.num_row();
248 int Nc =
F.num_col();
251 for (
int i = 1;
i <= Nc;
i++) {
261 if (!constraint_calculator.eval(new_x, y, new_F, new_Bx, new_By))
269 for (
int j = 1;
j <= Nc;
j++) {
271 cout <<
"bad gradient x " <<
i <<
" " <<
j <<
"\n";
278 cout << (test_F - new_F);
285 for (
int i = 1;
i <= Np;
i++) {
295 if (!constraint_calculator.eval(x, new_y, new_F, new_Bx, new_By))
303 for (
int j = 1;
j <= Nc;
j++) {
305 cout <<
"bad gradient y " <<
i <<
" " <<
j <<
"\n";
312 cout << (test_F - new_F);
Define an abstract interface for getting parameter settings.
CLHEP::HepVector Column_Vector
Define matrix types for the HitFit package, and supply a few additional operations.
Abstract base class for evaluating constraints. Users derive from this class and implement the eval()...
Constraint_Calculator(int nconstraints)
Base class for constrained fitter.
Base_Constrainer(const Base_Constrainer_Args &args)
friend std::ostream & operator<<(std::ostream &s, const Base_Constrainer &f)
Output stream operator, print the content of this Base_Constrainer to an output stream.
Abs< T >::type abs(const T &t)
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 a...
Abstract base classes for the fitter classes.
Base_Constrainer_Args(const Defaults &defs)
Hold on to parameters for the Base_Constrainer class.
const Base_Constrainer_Args _args
Define an interface for getting parameter settings.
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
virtual std::ostream & print(std::ostream &s) const
Print out internal state to output stream.
bool test_gradient() const
Row-vector class. CLHEP doesn't have a row-vector class, so HitFit uses its own. This is only a simpl...