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

NC::Fitter::FixVarsInt Class Reference

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

#include <NCFitter.h>

Inheritance diagram for NC::Fitter::FixVarsInt:

NC::Fitter::ICallableInt 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 249 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.

References NC::Fitter::CoordInt.

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

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

Definition at line 255 of file NCFitter.h.

00255 {} // 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::CoordInt, NC::Fitter::ICallableInt::EvalAt(), 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 257 of file NCFitter.h.

References NC::Fitter::CoordInt.

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

00257 {fFixed = c;}


Member Data Documentation

CoordInt NC::Fitter::FixVarsInt::fFixed [private]
 

Definition at line 260 of file NCFitter.h.

const ICallableInt* NC::Fitter::FixVarsInt::fFunc [private]
 

Definition at line 259 of file NCFitter.h.

Referenced by EvalAt().

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

Definition at line 261 of file NCFitter.h.

Referenced by EvalAt().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:39 2010 for loon by  doxygen 1.3.9.1