NC::Fitter::FixVarsInt Class Reference

Effectively reduce the number of arguments taken by fun. More...

#include <NCFitter.h>

Inheritance diagram for NC::Fitter::FixVarsInt:

List of all members.

Public Member Functions

 FixVarsInt (const ICallableInt *fun, const CoordInt &fix, const std::vector< int > &vary)
virtual ~FixVarsInt ()
double EvalAt (const CoordInt &r) const
void SetFixed (CoordInt c)

Private Attributes

const ICallableIntfFunc
CoordInt fFixed
std::vector< int > fToVary

Detailed Description

Effectively reduce the number of arguments taken by fun.

For each position not listed in vary` the value from the corresponding position in fix will be substituted in at call time.

Definition at line 253 of file NCFitter.h.

Constructor & Destructor Documentation

NC::Fitter::FixVarsInt::FixVarsInt ( const ICallableInt fun,
const CoordInt fix,
const std::vector< int > &  vary 

Definition at line 1384 of file NCFitter.cxx.

01387     :fFunc(fun), fFixed(fix), fToVary(vary){}

virtual NC::Fitter::FixVarsInt::~FixVarsInt (  )  [inline, virtual]

Definition at line 259 of file NCFitter.h.

00259 {} // shut gcc up

Member Function Documentation

double NC::Fitter::FixVarsInt::EvalAt ( const CoordInt r  )  const [virtual]

Reimplemented from NC::Fitter::ICallableInt.

Definition at line 1390 of file NCFitter.cxx.

References NC::Fitter::ICallableInt::EvalAt(), fFixed, fFunc, and fToVary.

01391   {
01392     assert(fToVary.size() == r.size());
01393     // For every parameter in the list of what we are to vary - substitute
01394     // in, in order, from the parameters we were passed.
01395     CoordInt fixed = fFixed;
01396     for(unsigned int n = 0; n < fToVary.size(); ++n)
01397       fixed[fToVary[n]] = r[n];
01398     return fFunc->EvalAt(fixed);
01399   }

void NC::Fitter::FixVarsInt::SetFixed ( CoordInt  c  )  [inline]

Definition at line 261 of file NCFitter.h.

References fFixed.

Referenced by NC::Fitter::MarginalizeSimpleInt::EvalAtEx().

00261 {fFixed = c;}

Member Data Documentation

Definition at line 264 of file NCFitter.h.

Referenced by EvalAt(), and SetFixed().

Definition at line 263 of file NCFitter.h.

Referenced by EvalAt().

std::vector<int> NC::Fitter::FixVarsInt::fToVary [private]

Definition at line 265 of file NCFitter.h.

Referenced by EvalAt().

The documentation for this class was generated from the following files:

Generated on 8 Jul 2019 for loon by  doxygen 1.6.1