#include <FunctClone.h>
Public Member Functions | |
void | add () const |
double | get (size_t i, double x) const |
double | get (size_t i) const |
Master (const F &f) | |
double | operator() () const |
double | operator() (double x) const |
size_t | size () const |
Private Member Functions | |
void | clear () const |
void | reset () const |
void | update () const |
void | update (double x) const |
Private Attributes | |
const boost::shared_ptr< F > | f_ |
std::vector< bool > | toBeUpdated_ |
double | value_ |
Definition at line 10 of file FunctClone.h.
funct::Master< F >::Master | ( | const F & | f | ) | [inline] |
Definition at line 11 of file FunctClone.h.
: f_(new F(f)), toBeUpdated_(1, true) { }
void funct::Master< F >::add | ( | ) | const [inline] |
Definition at line 19 of file FunctClone.h.
References funct::Master< F >::size(), and funct::Master< F >::toBeUpdated_.
{ toBeUpdated_.resize(size() + 1, true); }
void funct::Master< F >::clear | ( | void | ) | const [inline, private] |
Definition at line 37 of file FunctClone.h.
References lumiContext::fill, and funct::Master< F >::toBeUpdated_.
Referenced by funct::Master< F >::update().
{ std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), false); }
double funct::Master< F >::get | ( | size_t | i | ) | const [inline] |
Definition at line 23 of file FunctClone.h.
References i, funct::Master< F >::toBeUpdated_, funct::Master< F >::update(), and funct::Master< F >::value_.
{ if(toBeUpdated_[i]) update(); toBeUpdated_[i] = true; return value_; }
double funct::Master< F >::get | ( | size_t | i, |
double | x | ||
) | const [inline] |
Definition at line 28 of file FunctClone.h.
References i, funct::Master< F >::toBeUpdated_, funct::Master< F >::update(), funct::Master< F >::value_, and x.
{ if(toBeUpdated_[i]) update(x); toBeUpdated_[i] = true; return value_; }
double funct::Master< F >::operator() | ( | double | x | ) | const [inline] |
double funct::Master< F >::operator() | ( | ) | const [inline] |
Definition at line 13 of file FunctClone.h.
{ return get(0); }
void funct::Master< F >::reset | ( | void | ) | const [inline, private] |
Definition at line 34 of file FunctClone.h.
References lumiContext::fill, and funct::Master< F >::toBeUpdated_.
{ std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), true); }
size_t funct::Master< F >::size | ( | void | ) | const [inline] |
Definition at line 22 of file FunctClone.h.
References funct::Master< F >::toBeUpdated_.
Referenced by funct::Master< F >::add().
{ return toBeUpdated_.size(); }
void funct::Master< F >::update | ( | double | x | ) | const [inline, private] |
Definition at line 44 of file FunctClone.h.
References funct::Master< F >::clear(), funct::Master< F >::value_, and x.
void funct::Master< F >::update | ( | void | ) | const [inline, private] |
Definition at line 40 of file FunctClone.h.
References funct::Master< F >::clear(), and funct::Master< F >::value_.
Referenced by funct::Master< F >::get().
const boost::shared_ptr<F> funct::Master< F >::f_ [private] |
Definition at line 48 of file FunctClone.h.
std::vector<bool> funct::Master< F >::toBeUpdated_ [mutable, private] |
Definition at line 50 of file FunctClone.h.
Referenced by funct::Master< F >::add(), funct::Master< F >::clear(), funct::Master< F >::get(), funct::Master< F >::reset(), and funct::Master< F >::size().
double funct::Master< F >::value_ [mutable, private] |
Definition at line 49 of file FunctClone.h.
Referenced by funct::Master< F >::get(), and funct::Master< F >::update().