CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
funct::Master< F > Struct Template Reference

#include <FunctClone.h>

Public Member Functions

void add () const
 
double get (size_t i) const
 
double get (size_t i, double x) 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< Ff_
 
std::vector< bool > toBeUpdated_
 
double value_
 

Detailed Description

template<typename F>
struct funct::Master< F >

Definition at line 10 of file FunctClone.h.

Constructor & Destructor Documentation

template<typename F>
funct::Master< F >::Master ( const F f)
inline

Definition at line 11 of file FunctClone.h.

11  : f_(new F(f)), toBeUpdated_(1, true) {
12  }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:50
const boost::shared_ptr< F > f_
Definition: FunctClone.h:48
double f[11][100]
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281

Member Function Documentation

template<typename F>
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_.

Referenced by counter.Counter::register().

19  {
20  toBeUpdated_.resize(size() + 1, true);
21  }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:50
size_t size() const
Definition: FunctClone.h:22
template<typename F>
void funct::Master< F >::clear ( void  ) const
inlineprivate

Definition at line 37 of file FunctClone.h.

References lumiContext::fill, and funct::Master< F >::toBeUpdated_.

Referenced by funct::Master< F >::update().

37  {
38  std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), false);
39  }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:50
string fill
Definition: lumiContext.py:319
template<typename F>
double funct::Master< F >::get ( size_t  i) const
inline
template<typename F>
double funct::Master< F >::get ( size_t  i,
double  x 
) const
inline
template<typename F>
double funct::Master< F >::operator() ( ) const
inline

Definition at line 13 of file FunctClone.h.

13  {
14  return get(0);
15  }
template<typename F>
double funct::Master< F >::operator() ( double  x) const
inline

Definition at line 16 of file FunctClone.h.

16  {
17  return get(0, x);
18  }
template<typename F>
void funct::Master< F >::reset ( void  ) const
inlineprivate

Definition at line 34 of file FunctClone.h.

References lumiContext::fill, and funct::Master< F >::toBeUpdated_.

34  {
35  std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), true);
36  }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:50
string fill
Definition: lumiContext.py:319
template<typename F>
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().

22 { return toBeUpdated_.size(); }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:50
template<typename F>
void funct::Master< F >::update ( void  ) const
inlineprivate

Definition at line 40 of file FunctClone.h.

References funct::Master< F >::clear(), and funct::Master< F >::value_.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), funct::Master< F >::get(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

40  {
41  clear();
42  value_ = (*f_)();
43  }
void clear() const
Definition: FunctClone.h:37
double value_
Definition: FunctClone.h:49
template<typename F>
void funct::Master< F >::update ( double  x) const
inlineprivate

Definition at line 44 of file FunctClone.h.

References funct::Master< F >::clear(), and funct::Master< F >::value_.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

44  {
45  clear();
46  value_ = (*f_)(x);
47  }
void clear() const
Definition: FunctClone.h:37
double value_
Definition: FunctClone.h:49

Member Data Documentation

template<typename F>
const boost::shared_ptr<F> funct::Master< F >::f_
private

Definition at line 48 of file FunctClone.h.

template<typename F>
std::vector<bool> funct::Master< F >::toBeUpdated_
mutableprivate
template<typename F>
double funct::Master< F >::value_
mutableprivate

Definition at line 49 of file FunctClone.h.

Referenced by funct::Master< F >::get(), and funct::Master< F >::update().