Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

Function_plain_wrapper Class Reference

#include <Function.h>

Inheritance diagram for Function_plain_wrapper::

IFunction List of all members.

Public Methods

 Function_plain_wrapper (std::string label, Anaphe::IModelFunction *modelFun)
virtual ~Function_plain_wrapper ()
 If owner == true claim ownership. Function(string label, Anaphe::IModelFunction *modelFun, bool owner);. More...

virtual const std::string& label () const
virtual double value (const std::vector< double > &point) const
virtual int dimension () const
virtual const std::vector<
std::string >& 
parameterNames () const
virtual const std::vector<
double >& 
parameterValues () const
virtual bool setParameterValue (const std::string &name, double value)
virtual const std::string& version () const
bool setParameterValues (std::vector< double > vals)

Protected Attributes

std::string m_label
std::vector<std::string> m_parNames
 performance. More...

std::vector<double> m_parVals
Anaphe::IModelFunction* m_modelFun

Private Methods

 Function_plain_wrapper (const Function_plain_wrapper &)
Function_plain_wrapper& operator= (const Function_plain_wrapper &)
void _init ()

Private Attributes

std::string m_version

Detailed Description

Implement AIDA2 IFunction using Anaphe IModelFunction. Wraps plain IModelFunction pointer (no ownership transfer).

Warning: two "entry" points to wrapped model function: external pointer and this class interface. Inconsistency may occur if both updated at the same time (this class caches some information from model function).

Could be better optimized but for start this should be OK.

Definition at line 50 of file Function.h.


Constructor & Destructor Documentation

Function_plain_wrapper::Function_plain_wrapper ( std::string label,
Anaphe::IModelFunction * modelFun )
 

Function uses functionality of IModelFunctions in Anaphe. IModelFunction pointer must not be null. No ownership transfer. User must make sure that model function will not be deleted before this wrapper is deleted.

Function_plain_wrapper::~Function_plain_wrapper ( ) [virtual]
 

Definition at line 65 of file Function.cpp.

Function_plain_wrapper::Function_plain_wrapper ( const Function_plain_wrapper & ) [private]
 

Definition at line 71 of file Function.cpp.


Member Function Documentation

void Function_plain_wrapper::_init ( ) [private]
 

Definition at line 57 of file Function.cpp.

int Function_plain_wrapper::dimension ( ) const [virtual]
 

Returns:
dimension of the function

Definition at line 92 of file Function.cpp.

Referenced by Function_impl_owner::dimension(), and FitFunction::dimension().

const std::string & Function_plain_wrapper::label ( ) const [virtual]
 

Definition at line 82 of file Function.cpp.

Referenced by Function_impl_owner::label(), and FitFunction::label().

Function_plain_wrapper & Function_plain_wrapper::operator= ( const Function_plain_wrapper & rhs ) [private]
 

Definition at line 75 of file Function.cpp.

const std::vector< std::string > & Function_plain_wrapper::parameterNames ( ) const [virtual]
 

Returns:

Definition at line 97 of file Function.cpp.

Referenced by Function_impl_owner::parameterNames(), and FitFunction::parameterNames().

const std::vector< double > & Function_plain_wrapper::parameterValues ( ) const [virtual]
 

Returns:

Definition at line 102 of file Function.cpp.

Referenced by Function_impl_owner::parameterValues(), and FitFunction::parameterValues().

bool Function_plain_wrapper::setParameterValue ( const std::string & name,
double value ) [virtual]
 

Definition at line 112 of file Function.cpp.

Referenced by Function_impl_owner::setParameterValue(), and FitFunction::setParameterValue().

bool Function_plain_wrapper::setParameterValues ( std::vector< double > vals )
 

Referenced by FitFunction::m_fit(), and Function_impl_owner::setParameterValues().

double Function_plain_wrapper::value ( const std::vector< double > & point ) const [virtual]
 

Parameters:
point   of evaluation
Returns:
value at the given point or NaN if function is not defined at this point
Exceptions:
IllegalArgumentException   if the length of the array is incorrect

Definition at line 87 of file Function.cpp.

Referenced by Function_impl_owner::value(), and FitFunction::value().

const std::string & Function_plain_wrapper::version ( ) const [virtual]
 

Definition at line 107 of file Function.cpp.

Referenced by Function_impl_owner::version().


Member Data Documentation

std::string Function_plain_wrapper::m_label [protected]
 

Definition at line 121 of file Function.h.

Anaphe::IModelFunction * Function_plain_wrapper::m_modelFun [protected]
 

Definition at line 127 of file Function.h.

std::vector< std::string > Function_plain_wrapper::m_parNames [protected]
 

Definition at line 124 of file Function.h.

std::vector< double > Function_plain_wrapper::m_parVals<double> [protected]
 

Definition at line 125 of file Function.h.

std::string Function_plain_wrapper::m_version [mutable, private]
 

Definition at line 132 of file Function.h.


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

Anaphe documentation generated by Doxygen (www.doxygen.org)