ROOT logo
// @(#)root/mathcore:$Id$
// Author: L. Moneta Mon Nov 13 15:58:13 2006

/**********************************************************************
 *                                                                    *
 * Copyright (c) 2006  LCG ROOT Math Team, CERN/PH-SFT                *
 *                                                                    *
 *                                                                    *
 **********************************************************************/

// Heaer file for Functor classes. 
// designed is inspired by the Loki Functor

#ifndef ROOT_Math_Functor
#define ROOT_Math_Functor

#ifndef ROOT_Math_IFunction
#include "Math/IFunction.h"
#endif

// #ifndef Root_Math_StaticCheck
// #include "Math/StaticCheck.h"
// #endif

#include <memory> 


namespace ROOT { 

namespace Math { 

/**
   FunctorImpl is a base class for the functor 
   handler implementation class. 
   It defines the Copy operator used to clone the functor objects
*/

template<class IBaseFunc> 
class FunctorImpl : public IBaseFunc { 

public: 

   typedef IBaseFunc BaseFunc; 


   FunctorImpl() : IBaseFunc() { }

   virtual ~FunctorImpl() {}

   virtual FunctorImpl* Copy() const = 0; 

};

/** 
   Functor Handler class is responsible for wrapping any other functor and pointer to 
   free C functions.
   It can be created from any function implementing the correct signature 
   corresponding to the requested type
   In the case of one dimension the function evaluation object must implement
   double operator() (double x). If it implements a method:  double Derivative(double x) 
   can be used to create a Gradient function type. 
   
   In the case of multi-dimension the function evaluation object must implement 
   double operator()(const double *x). If it implements a method: 
   double Derivative(const double *x, int icoord) 
   can be used to create a Gradient function type.

   @ingroup  Functor_int

*/ 
template<class ParentFunctor, class Func >
class FunctorHandler : public ParentFunctor::Impl { 

   typedef typename ParentFunctor::Impl ImplFunc; 
   typedef typename ImplFunc::BaseFunc BaseFunc; 
   //typedef typename ParentFunctor::Dim Dim; 


public: 

   // constructor for 1d functions 
   FunctorHandler(const Func & fun) : fDim(1), fFunc(fun) {}


   // constructor for multi-dimensional functions w/0 NDim()
   FunctorHandler(unsigned int dim, const Func & fun ) :
      fDim(dim),
      fFunc(fun) 
   {}

   virtual ~FunctorHandler() {}

   // copy of the function handler (use copy-ctor)
   ImplFunc * Copy() const { 
     return new FunctorHandler(*this); 
   }

   // clone of the function handler (use copy-ctor) 
   BaseFunc * Clone() const { 
      return Copy(); 
   }


   // constructor for multi-dimensional functions
   unsigned int NDim() const { 
      return fDim;
   } 

private :

   inline double DoEval (double x) const { 
      return fFunc(x); 
   }  

   inline double DoEval (const double * x) const { 
      return fFunc(x); 
   }  

   inline double DoDerivative (double x) const { 
      return fFunc.Derivative(x);
   }  

   inline double DoDerivative (const double * x, unsigned int icoord ) const { 
      return fFunc.Derivative(x,icoord);
   }  

   
   unsigned int fDim; 
   mutable Func fFunc;  // should here be a reference and pass a non-const ref in ctor 

};


/** 
   Functor Handler class for gradient functions where both callable objects are provided for the function 
   evaluation (type Func) and for the gradient (type GradFunc) .
   It can be created from any function implementing the correct signature 
   corresponding to the requested type
   In the case of one dimension the function evaluation object and the derivative function object must implement
   double operator() (double x).
   In the case of multi-dimension the function evaluation object must implement 
   double operator() (const double * x) and the gradient function object must implement 
   double operator() (const double * x, int icoord) 

   @ingroup  Functor_int
*/ 
template<class ParentFunctor, class Func, class GradFunc  >
class FunctorGradHandler : public ParentFunctor::Impl { 

   typedef typename ParentFunctor::Impl ImplFunc; 
   typedef typename ImplFunc::BaseFunc BaseFunc; 
   //typedef typename ParentFunctor::Dim Dim; 

public: 

   // constructor for 1d functions 
   FunctorGradHandler(const Func & fun, const GradFunc & gfun) : 
      fDim(1), 
      fFunc(fun), 
      fGradFunc(gfun)  
   {}


   // constructor for multi-dimensional functions 
   FunctorGradHandler(unsigned int dim, const Func & fun, const GradFunc & gfun) :
      fDim(dim),
      fFunc(fun), 
      fGradFunc( gfun ) 
   {}

   virtual ~FunctorGradHandler() {} 

   // clone of the function handler (use copy-ctor) 
   ImplFunc * Copy() const { return new FunctorGradHandler(*this); }

   // clone of the function handler (use copy-ctor) 
   BaseFunc * Clone() const { return Copy(); }

   // constructor for multi-dimensional functions
   unsigned int NDim() const { 
      return fDim;
   } 

private :

   inline double DoEval (double x) const { 
      return fFunc(x); 
   }  

   inline double DoEval (const double * x) const { 
      return fFunc(x); 
   }  

   inline double DoDerivative (double x) const { 
      return fGradFunc(x);
   }  

   inline double DoDerivative (const double * x, unsigned int icoord ) const { 
      return fGradFunc(x, icoord); 
   }  

   
   unsigned int fDim; 
   mutable Func fFunc; 
   mutable GradFunc fGradFunc;  

};


/**
   Functor Handler to Wrap pointers to member functions 
   The member function type must be (XXX means any name is allowed) : 
   double XXX ( double x) for 1D functions 
   and 
   double XXXX (const double *x) for multi-dimensional functions

   @ingroup  Functor_int
*/
template <class ParentFunctor, typename PointerToObj,
          typename PointerToMemFn>
class MemFunHandler : public ParentFunctor::Impl
{
   //typedef typename ParentFunctor::Dim Dim; 
   typedef typename ParentFunctor::Impl ImplFunc; 
   typedef typename ImplFunc::BaseFunc BaseFunc; 
   
public:
   
   /// constructor from a pointer to the class and a pointer to the function
   MemFunHandler(const PointerToObj& pObj, PointerToMemFn pMemFn) 
      : fDim(1), fObj(pObj), fMemFn(pMemFn)        // should pass pointer by value ??
   {}

   /// constructor from a pointer to the class and a pointer to the function
   MemFunHandler(unsigned int dim, const PointerToObj& pObj, PointerToMemFn pMemFn) 
      : fDim(dim), fObj(pObj), fMemFn(pMemFn)
   {}

   virtual ~MemFunHandler() {}
   
   // clone of the function handler (use copy-ctor) 
   ImplFunc * Copy() const { return new MemFunHandler(*this); }

   // clone of the function handler (use copy-ctor) 
   BaseFunc * Clone() const { return new MemFunHandler(*this); }

   // constructor for multi-dimensional functions
   unsigned int NDim() const { 
      return fDim;
   } 

private :
       
   inline double DoEval (double x) const { 
      return ((*fObj).*fMemFn)(x);  
   }  
       
   inline double DoEval (const double * x) const { 
      return ((*fObj).*fMemFn)(x);  
   }

   unsigned int fDim; 
   mutable PointerToObj fObj;
   PointerToMemFn fMemFn; 

};

/**
   Functor Handler to Wrap pointers to member functions for the evaluation of the function 
   and the gradient.  
   The member function type must be (XXX means any name is allowed) : 
   double XXX ( double x) for 1D function and derivative evaluation  
   double XXX (const double *x) for multi-dimensional function evaluation and 
   double XXX (cost double *x, int icoord) for partial derivatives evaluation

   @ingroup  Functor_int

*/
template <class ParentFunctor, typename PointerToObj,
          typename PointerToMemFn, typename PointerToGradMemFn>
class MemGradFunHandler : public ParentFunctor::Impl
{
   typedef typename ParentFunctor::Impl ImplFunc; 
   typedef typename ImplFunc::BaseFunc BaseFunc; 
   //typedef typename ParentFunctor::Dim Dim; 

public:
   
   /// constructor from a pointer to the class and a pointer to the function
   MemGradFunHandler(const PointerToObj& pObj, PointerToMemFn pMemFn, PointerToGradMemFn pGradMemFn) 
      : fDim(1), 
        fObj(pObj), 
        fMemFn(pMemFn), 
        fGradMemFn(pGradMemFn)
   {}

   /// constructor from a pointer to the class and a pointer to the function
   MemGradFunHandler(unsigned int dim, 
                 const PointerToObj& pObj, 
                 PointerToMemFn pMemFn, 
                 PointerToGradMemFn pGradMemFn ) 
      : fDim(dim), 
        fObj(pObj), 
        fMemFn(pMemFn), 
        fGradMemFn(pGradMemFn)
   {}
       
   virtual ~MemGradFunHandler() {}

   // clone of the function handler (use copy-ctor) 
   ImplFunc * Copy() const { return new MemGradFunHandler(*this); }
   
   // clone of the function handler (use copy-ctor) 
   BaseFunc * Clone() const { return new MemGradFunHandler(*this); }

   // constructor for multi-dimensional functions
   unsigned int NDim() const { 
      return fDim;
   } 

private :
       
   inline double DoEval (double x) const { 
      return ((*fObj).*fMemFn)(x);  
   }  
       
   inline double DoEval (const double * x) const { 
      return ((*fObj).*fMemFn)(x);  
   }  

   inline double DoDerivative (double x) const { 
      return ((*fObj).*fGradMemFn)(x);  
   }  

   inline double DoDerivative (const double * x, unsigned int icoord ) const { 
      return ((*fObj).*fGradMemFn)(x,icoord);  
   }  

   unsigned int fDim; 
   mutable PointerToObj fObj;
   PointerToMemFn fMemFn;
   PointerToGradMemFn fGradMemFn;
};
  

//****************************
// LM 7/2/2014:  no needed this : make template ctor of Functor1D and GradFunctor1D not 
// available to CINT s
//***************************************
//#if defined(__MAKECINT__) || defined(G__DICTIONARY) 
// needed since CINT initialize it with TRootIOCtor
//class TRootIOCtor; 

// template<class ParentFunctor> 
// class FunctorHandler<ParentFunctor,TRootIOCtor *> : public ParentFunctor::Impl 
// {
// public:
//    typedef typename ParentFunctor::Impl ImplFunc; 
//    typedef typename ImplFunc::BaseFunc BaseFunc; 

//    FunctorHandler(TRootIOCtor  *) {}
//    // function required by interface
//    virtual ~FunctorHandler() {}
//    double DoEval (double ) const  { return 0; } 
//    double DoDerivative (double ) const  { return 0; } 
//    ImplFunc  * Copy() const {  return 0;  } 
//    BaseFunc  * Clone() const {  return 0;  } 

// }; 
// #endif   


//_______________________________________________________________________________________________
/**
   Documentation for class Functor class. 
   It is used to wrap in a very simple and convenient way multi-dimensional function objects. 
   It can wrap all the following types:
   <ul>
   <li> any C++ callable object implemention double operator()( const double *  ) 
   <li> a free C function of type double ()(const double * ) 
   <li> a member function with the correct signature like Foo::Eval(const double * ). 
       In this case one pass the object pointer and a pointer to the member function (&Foo::Eval) 
   </ul>
   The function dimension is required when constructing the functor.  

   @ingroup  GenFunc

 */
class Functor : public IBaseFunctionMultiDim  { 


public: 

   typedef FunctorImpl<IBaseFunctionMultiDim> Impl;   
   typedef IBaseFunctionMultiDim::BaseFunc ImplBase;   

   /** 
      Default constructor
   */ 
   Functor ()  : fImpl(0) {}  


   /** 
       construct from a pointer to member function (multi-dim type)
    */ 
   template <class PtrObj, typename MemFn>
   Functor(const PtrObj& p, MemFn memFn, unsigned int dim )
      : fImpl(new MemFunHandler<Functor, PtrObj, MemFn>(dim, p, memFn))
   {}



   /**
      construct from a callable object of multi-dimension 
      with the right signature (implementing operator()(double *x)
    */
   template <typename Func> 
   Functor( const Func & f, unsigned int dim ) : 
      fImpl(new FunctorHandler<Functor,Func>(dim,f) )
   {}


   //implement for interpreted CINT functions
#if defined(__CINT__) || defined(G__DICTIONARY) || defined(MAKE_CINT_FUNCTOR)
   Functor(void * p, unsigned int dim, const char * className = 0, const char * methodName = 0);
#endif 


   /** 
      Destructor (no operations)
   */ 
   virtual ~Functor ()  {}  

   /** 
      Copy constructor for functor based on ROOT::Math::IMultiGenFunction
   */ 
   Functor(const Functor & rhs) : 
      ImplBase()  
   {
      if (rhs.fImpl.get() != 0) 
         fImpl = std::auto_ptr<Impl>( (rhs.fImpl)->Copy() ); 
   } 
   // need a specialization in order to call base classes and use  clone


   /** 
      Assignment operator
   */ 
   Functor & operator = (const Functor & rhs)  {
      Functor copy(rhs); 
      // swap auto_ptr by hand
      Impl * p = fImpl.release(); 
      fImpl.reset(copy.fImpl.release());
      copy.fImpl.reset(p);
      return *this;
   }


   // clone of the function handler (use copy-ctor) 
   ImplBase * Clone() const { return new Functor(*this); }

   // for multi-dimensional functions
   unsigned int NDim() const { return fImpl->NDim(); } 

private :


   inline double DoEval (const double * x) const { 
      return (*fImpl)(x); 
   }  


   std::auto_ptr<Impl> fImpl;   // pointer to base functor handler


}; 

//______________________________________________________________________________________
/**
   Functor1D class for one-dimensional functions. 
   It is used to wrap in a very simple and convenient way: 
   <ul>
   <li> any C++ callable object implemention double operator()( double  ) 
   <li> a free C function of type double ()(double ) 
   <li> a member function with the correct signature like Foo::Eval(double ). 
       In this case one pass the object pointer and a pointer to the member function (&Foo::Eval) 
   </ul>


   @ingroup  GenFunc

 */

class Functor1D : public IBaseFunctionOneDim  { 


public: 

   typedef FunctorImpl<IBaseFunctionOneDim>          Impl;   
   typedef IBaseFunctionOneDim::BaseFunc ImplBase; 

   /** 
      Default constructor
   */ 
   Functor1D ()  : fImpl(0) {}  

#ifndef __CINT__
   /**
      construct from a callable object with the right signature 
      implementing operator() (double x)
    */
   template <typename Func> 
   Functor1D(const Func & f) : 
      fImpl(new FunctorHandler<Functor1D,Func>(f) )
   {}
#endif


   /** 
       construct from a pointer to member function (1D type)
    */ 
   template <class PtrObj, typename MemFn>
   Functor1D(const PtrObj& p, MemFn memFn)
      : fImpl(new MemFunHandler<Functor1D, PtrObj, MemFn>(p, memFn))
   {}


   //implement for interpreted CINT functions
#if defined(__CINT__) || defined(G__DICTIONARY) || defined(MAKE_CINT_FUNCTOR)
   Functor1D(void * p, const char * className = 0, const char * methodName = 0);

#endif

   /** 
      Destructor (no operations)
   */ 
   virtual ~Functor1D ()  {}  


   /** 
      Copy constructor for Functor based on ROOT::Math::IGenFunction
   */ 
   Functor1D(const Functor1D & rhs) : 
      // strange that this is required eventhough ImplBase is an abstract class
      ImplBase()
   {
      if (rhs.fImpl.get() != 0) 
         fImpl = std::auto_ptr<Impl>( (rhs.fImpl)->Copy() ); 
   } 


   /** 
      Assignment operator
   */ 
   Functor1D & operator = (const Functor1D & rhs)  {
      Functor1D copy(rhs); 
      // swap auto_ptr by hand
      Impl * p = fImpl.release(); 
      fImpl.reset(copy.fImpl.release());
      copy.fImpl.reset(p);
      return *this;
   }


   // clone of the function handler (use copy-ctor) 
   ImplBase * Clone() const { return new Functor1D(*this); }


private :

   inline double DoEval (double x) const { 
      return (*fImpl)(x); 
   }  


   std::auto_ptr<Impl> fImpl;   // pointer to base functor handler


}; 

//_______________________________________________________________________________________________
/**
   GradFunctor class for Multidimensional gradient functions. 
   It is used to wrap in a very C++ callable object to make gradient functions. 
   It can be constructed in three different way: 
   <ol>
   <li> from an object implementing both  
        double operator()( const double * ) for the function evaluation  and 
        double Derivative(const double *, int icoord) for the partial derivatives
    <li>from an object implementing any member function like Foo::XXX(const double *) for the function evaluation 
        and any member function like Foo::XXX(const double *, int icoord) for the partial derivatives
    <li>from an function object implementing 
        double operator()( const double * ) for the function evaluation and another function object implementing 
        double operator() (const double *, int icoord) for the partial derivatives
   </ol>
   The function dimension is required when constructing the functor.  

   @ingroup  GenFunc

 */
class GradFunctor : public IGradientFunctionMultiDim  { 


public: 

   typedef FunctorImpl<IGradientFunctionMultiDim> Impl;   
   typedef IGradientFunctionMultiDim::BaseFunc ImplBase;   
   

   /** 
      Default constructor
   */ 
   GradFunctor ()  : fImpl(0) {}  

   /**
      construct from a callable object of multi-dimension 
      implementing operator()(const double *x) and 
      Derivative(const double * x,icoord)
    */
   template <typename Func> 
   GradFunctor( const Func & f, unsigned int dim ) : 
      fImpl(new FunctorHandler<GradFunctor,Func>(dim,f) )
   {}

   /** 
       construct from a pointer to member function and member function types for function and derivative evaluations
    */ 
   template <class PtrObj, typename MemFn, typename GradMemFn>
   GradFunctor(const PtrObj& p, MemFn memFn, GradMemFn gradFn, unsigned int dim )
      : fImpl(new MemGradFunHandler<GradFunctor, PtrObj, MemFn, GradMemFn>(dim, p, memFn, gradFn))
   {}

   /**
      construct for Gradient Functions of multi-dimension
      Func gives the function evaluatiion, GradFunc the partial derivatives
      The function dimension is  required 
    */
   template <typename Func, typename GradFunc> 
   GradFunctor(const Func & f, const GradFunc & g, int dim  ) : 
      fImpl(new FunctorGradHandler<GradFunctor,Func,GradFunc>(dim, f, g) )
   { }

   // for interpreted CINT functions
#if defined(__CINT__) || defined(G__DICTIONARY) || defined(MAKE_CINT_FUNCTOR)
   GradFunctor(void * p1, unsigned int dim, const char * className, const char * methodName, const char * derivName);
   GradFunctor(void * p1, void * p2, unsigned int dim);
#endif 

   /** 
      Destructor (no operations)
   */ 
   virtual ~GradFunctor ()  {}  


   /** 
      Copy constructor for functor based on ROOT::Math::IMultiGradFunction
   */ 
   GradFunctor(const GradFunctor & rhs) : 
      ImplBase(), 
      IGradientFunctionMultiDim()
   {
      if (rhs.fImpl.get() != 0) 
         fImpl = std::auto_ptr<Impl>( rhs.fImpl->Copy() ); 
   } 

   /** 
      Assignment operator
   */ 
   GradFunctor & operator = (const GradFunctor & rhs)  {
      GradFunctor copy(rhs); 
      // swap auto_ptr by hand
      Impl * p = fImpl.release(); 
      fImpl.reset(copy.fImpl.release());
      copy.fImpl.reset(p);
      return *this;
   }


   // clone of the function handler (use copy-ctor) 
   ImplBase * Clone() const { return new GradFunctor(*this); }

   // for multi-dimensional functions
   unsigned int NDim() const { return fImpl->NDim(); } 

private :


   inline double DoEval (const double * x) const { 
      return (*fImpl)(x); 
   }  


   inline double DoDerivative (const double * x, unsigned int icoord  ) const { 
      return fImpl->Derivative(x,icoord);
   }  

   std::auto_ptr<Impl> fImpl;    // pointer to base grad functor handler


}; 


//_______________________________________________________________________________________________
/**
   GradFunctor1D class for one-dimensional gradient functions. 
   It is used to wrap in a very C++ callable object to make a 1D gradient functions. 
   It can be constructed in three different way: 
   <ol>
   <li> from an object implementing both  
        double operator()( double  ) for the function evaluation  and 
        double Derivative(double ) for the partial derivatives
    <li>from an object implementing any member function like Foo::XXX(double ) for the function evaluation 
        and any other member function like Foo::YYY(double ) for the derivative.
    <li>from an 2 function objects implementing 
        double operator()( double ) . One object provides the function evaluation, the other the derivative.
   </ol>

   @ingroup  GenFunc

 */

class GradFunctor1D : public IGradientFunctionOneDim  { 


public: 

   typedef FunctorImpl<IGradientFunctionOneDim>  Impl; 
   typedef IGradientFunctionOneDim::BaseFunc ImplBase; 
   

   /** 
      Default constructor
   */ 
   GradFunctor1D ()  : fImpl(0) {}  


#ifndef __CINT__
   /**
      construct from an object with the right signature 
      implementing both operator() (double x) and Derivative(double x)
    */
   template <typename Func> 
   GradFunctor1D(const Func & f) : 
      fImpl(new FunctorHandler<GradFunctor1D,Func>(f) )
   {}
#endif


   /** 
       construct from a pointer to class and two pointers to member functions, one for 
       the function evaluation and the other for the derivative. 
       The member functions must take a double as argument and return a double
    */ 
   template <class PtrObj, typename MemFn, typename GradMemFn>
   GradFunctor1D(const PtrObj& p, MemFn memFn, GradMemFn gradFn)
      : fImpl(new MemGradFunHandler<GradFunctor1D, PtrObj, MemFn, GradMemFn>(p, memFn, gradFn))
   {}



   // eventually implement for interpreted CINT functions
#if defined(__CINT__) || defined(G__DICTIONARY) || defined(MAKE_CINT_FUNCTOR)
   GradFunctor1D(void * p1, const char * className, const char * methodName, const char * derivName);
   GradFunctor1D(void * p1, void * p2);
#endif

   /**
      construct from two 1D function objects
    */
   template <typename Func, typename GradFunc> 
   GradFunctor1D(const Func & f, const GradFunc & g ) : 
      fImpl(new FunctorGradHandler<GradFunctor1D,Func, GradFunc>(f, g) )
   {}

   /** 
      Destructor (no operations)
   */ 
   virtual ~GradFunctor1D ()  {}  


   /** 
      Copy constructor for Functor based on ROOT::Math::IGradFunction
   */ 
   GradFunctor1D(const GradFunctor1D & rhs) : 
      // strange that this is required eventhough Impl is an abstract class
      ImplBase(), 
      IGradientFunctionOneDim()          
   {
      if (rhs.fImpl.get() != 0) 
         fImpl = std::auto_ptr<Impl>( rhs.fImpl->Copy()  ); 
   } 


   /** 
      Assignment operator
   */ 
   GradFunctor1D & operator = (const GradFunctor1D & rhs)  {
      GradFunctor1D copy(rhs); 
      // swap auto_ptr by hand
      Impl * p = fImpl.release(); 
      fImpl.reset(copy.fImpl.release());
      copy.fImpl.reset(p);
      return *this;
   }


   // clone of the function handler (use copy-ctor) 
   ImplBase * Clone() const { return new GradFunctor1D(*this); }


private :


   inline double DoEval (double x) const { 
      return (*fImpl)(x); 
   }  


   inline double DoDerivative (double x) const { 
      return fImpl->Derivative(x);
   }  

   std::auto_ptr<Impl> fImpl;    // pointer to base gradient functor handler

}; 



   } // end namespace Math

} // end namespace ROOT


#endif /* ROOT_Math_Functor */
 Functor.h:1
 Functor.h:2
 Functor.h:3
 Functor.h:4
 Functor.h:5
 Functor.h:6
 Functor.h:7
 Functor.h:8
 Functor.h:9
 Functor.h:10
 Functor.h:11
 Functor.h:12
 Functor.h:13
 Functor.h:14
 Functor.h:15
 Functor.h:16
 Functor.h:17
 Functor.h:18
 Functor.h:19
 Functor.h:20
 Functor.h:21
 Functor.h:22
 Functor.h:23
 Functor.h:24
 Functor.h:25
 Functor.h:26
 Functor.h:27
 Functor.h:28
 Functor.h:29
 Functor.h:30
 Functor.h:31
 Functor.h:32
 Functor.h:33
 Functor.h:34
 Functor.h:35
 Functor.h:36
 Functor.h:37
 Functor.h:38
 Functor.h:39
 Functor.h:40
 Functor.h:41
 Functor.h:42
 Functor.h:43
 Functor.h:44
 Functor.h:45
 Functor.h:46
 Functor.h:47
 Functor.h:48
 Functor.h:49
 Functor.h:50
 Functor.h:51
 Functor.h:52
 Functor.h:53
 Functor.h:54
 Functor.h:55
 Functor.h:56
 Functor.h:57
 Functor.h:58
 Functor.h:59
 Functor.h:60
 Functor.h:61
 Functor.h:62
 Functor.h:63
 Functor.h:64
 Functor.h:65
 Functor.h:66
 Functor.h:67
 Functor.h:68
 Functor.h:69
 Functor.h:70
 Functor.h:71
 Functor.h:72
 Functor.h:73
 Functor.h:74
 Functor.h:75
 Functor.h:76
 Functor.h:77
 Functor.h:78
 Functor.h:79
 Functor.h:80
 Functor.h:81
 Functor.h:82
 Functor.h:83
 Functor.h:84
 Functor.h:85
 Functor.h:86
 Functor.h:87
 Functor.h:88
 Functor.h:89
 Functor.h:90
 Functor.h:91
 Functor.h:92
 Functor.h:93
 Functor.h:94
 Functor.h:95
 Functor.h:96
 Functor.h:97
 Functor.h:98
 Functor.h:99
 Functor.h:100
 Functor.h:101
 Functor.h:102
 Functor.h:103
 Functor.h:104
 Functor.h:105
 Functor.h:106
 Functor.h:107
 Functor.h:108
 Functor.h:109
 Functor.h:110
 Functor.h:111
 Functor.h:112
 Functor.h:113
 Functor.h:114
 Functor.h:115
 Functor.h:116
 Functor.h:117
 Functor.h:118
 Functor.h:119
 Functor.h:120
 Functor.h:121
 Functor.h:122
 Functor.h:123
 Functor.h:124
 Functor.h:125
 Functor.h:126
 Functor.h:127
 Functor.h:128
 Functor.h:129
 Functor.h:130
 Functor.h:131
 Functor.h:132
 Functor.h:133
 Functor.h:134
 Functor.h:135
 Functor.h:136
 Functor.h:137
 Functor.h:138
 Functor.h:139
 Functor.h:140
 Functor.h:141
 Functor.h:142
 Functor.h:143
 Functor.h:144
 Functor.h:145
 Functor.h:146
 Functor.h:147
 Functor.h:148
 Functor.h:149
 Functor.h:150
 Functor.h:151
 Functor.h:152
 Functor.h:153
 Functor.h:154
 Functor.h:155
 Functor.h:156
 Functor.h:157
 Functor.h:158
 Functor.h:159
 Functor.h:160
 Functor.h:161
 Functor.h:162
 Functor.h:163
 Functor.h:164
 Functor.h:165
 Functor.h:166
 Functor.h:167
 Functor.h:168
 Functor.h:169
 Functor.h:170
 Functor.h:171
 Functor.h:172
 Functor.h:173
 Functor.h:174
 Functor.h:175
 Functor.h:176
 Functor.h:177
 Functor.h:178
 Functor.h:179
 Functor.h:180
 Functor.h:181
 Functor.h:182
 Functor.h:183
 Functor.h:184
 Functor.h:185
 Functor.h:186
 Functor.h:187
 Functor.h:188
 Functor.h:189
 Functor.h:190
 Functor.h:191
 Functor.h:192
 Functor.h:193
 Functor.h:194
 Functor.h:195
 Functor.h:196
 Functor.h:197
 Functor.h:198
 Functor.h:199
 Functor.h:200
 Functor.h:201
 Functor.h:202
 Functor.h:203
 Functor.h:204
 Functor.h:205
 Functor.h:206
 Functor.h:207
 Functor.h:208
 Functor.h:209
 Functor.h:210
 Functor.h:211
 Functor.h:212
 Functor.h:213
 Functor.h:214
 Functor.h:215
 Functor.h:216
 Functor.h:217
 Functor.h:218
 Functor.h:219
 Functor.h:220
 Functor.h:221
 Functor.h:222
 Functor.h:223
 Functor.h:224
 Functor.h:225
 Functor.h:226
 Functor.h:227
 Functor.h:228
 Functor.h:229
 Functor.h:230
 Functor.h:231
 Functor.h:232
 Functor.h:233
 Functor.h:234
 Functor.h:235
 Functor.h:236
 Functor.h:237
 Functor.h:238
 Functor.h:239
 Functor.h:240
 Functor.h:241
 Functor.h:242
 Functor.h:243
 Functor.h:244
 Functor.h:245
 Functor.h:246
 Functor.h:247
 Functor.h:248
 Functor.h:249
 Functor.h:250
 Functor.h:251
 Functor.h:252
 Functor.h:253
 Functor.h:254
 Functor.h:255
 Functor.h:256
 Functor.h:257
 Functor.h:258
 Functor.h:259
 Functor.h:260
 Functor.h:261
 Functor.h:262
 Functor.h:263
 Functor.h:264
 Functor.h:265
 Functor.h:266
 Functor.h:267
 Functor.h:268
 Functor.h:269
 Functor.h:270
 Functor.h:271
 Functor.h:272
 Functor.h:273
 Functor.h:274
 Functor.h:275
 Functor.h:276
 Functor.h:277
 Functor.h:278
 Functor.h:279
 Functor.h:280
 Functor.h:281
 Functor.h:282
 Functor.h:283
 Functor.h:284
 Functor.h:285
 Functor.h:286
 Functor.h:287
 Functor.h:288
 Functor.h:289
 Functor.h:290
 Functor.h:291
 Functor.h:292
 Functor.h:293
 Functor.h:294
 Functor.h:295
 Functor.h:296
 Functor.h:297
 Functor.h:298
 Functor.h:299
 Functor.h:300
 Functor.h:301
 Functor.h:302
 Functor.h:303
 Functor.h:304
 Functor.h:305
 Functor.h:306
 Functor.h:307
 Functor.h:308
 Functor.h:309
 Functor.h:310
 Functor.h:311
 Functor.h:312
 Functor.h:313
 Functor.h:314
 Functor.h:315
 Functor.h:316
 Functor.h:317
 Functor.h:318
 Functor.h:319
 Functor.h:320
 Functor.h:321
 Functor.h:322
 Functor.h:323
 Functor.h:324
 Functor.h:325
 Functor.h:326
 Functor.h:327
 Functor.h:328
 Functor.h:329
 Functor.h:330
 Functor.h:331
 Functor.h:332
 Functor.h:333
 Functor.h:334
 Functor.h:335
 Functor.h:336
 Functor.h:337
 Functor.h:338
 Functor.h:339
 Functor.h:340
 Functor.h:341
 Functor.h:342
 Functor.h:343
 Functor.h:344
 Functor.h:345
 Functor.h:346
 Functor.h:347
 Functor.h:348
 Functor.h:349
 Functor.h:350
 Functor.h:351
 Functor.h:352
 Functor.h:353
 Functor.h:354
 Functor.h:355
 Functor.h:356
 Functor.h:357
 Functor.h:358
 Functor.h:359
 Functor.h:360
 Functor.h:361
 Functor.h:362
 Functor.h:363
 Functor.h:364
 Functor.h:365
 Functor.h:366
 Functor.h:367
 Functor.h:368
 Functor.h:369
 Functor.h:370
 Functor.h:371
 Functor.h:372
 Functor.h:373
 Functor.h:374
 Functor.h:375
 Functor.h:376
 Functor.h:377
 Functor.h:378
 Functor.h:379
 Functor.h:380
 Functor.h:381
 Functor.h:382
 Functor.h:383
 Functor.h:384
 Functor.h:385
 Functor.h:386
 Functor.h:387
 Functor.h:388
 Functor.h:389
 Functor.h:390
 Functor.h:391
 Functor.h:392
 Functor.h:393
 Functor.h:394
 Functor.h:395
 Functor.h:396
 Functor.h:397
 Functor.h:398
 Functor.h:399
 Functor.h:400
 Functor.h:401
 Functor.h:402
 Functor.h:403
 Functor.h:404
 Functor.h:405
 Functor.h:406
 Functor.h:407
 Functor.h:408
 Functor.h:409
 Functor.h:410
 Functor.h:411
 Functor.h:412
 Functor.h:413
 Functor.h:414
 Functor.h:415
 Functor.h:416
 Functor.h:417
 Functor.h:418
 Functor.h:419
 Functor.h:420
 Functor.h:421
 Functor.h:422
 Functor.h:423
 Functor.h:424
 Functor.h:425
 Functor.h:426
 Functor.h:427
 Functor.h:428
 Functor.h:429
 Functor.h:430
 Functor.h:431
 Functor.h:432
 Functor.h:433
 Functor.h:434
 Functor.h:435
 Functor.h:436
 Functor.h:437
 Functor.h:438
 Functor.h:439
 Functor.h:440
 Functor.h:441
 Functor.h:442
 Functor.h:443
 Functor.h:444
 Functor.h:445
 Functor.h:446
 Functor.h:447
 Functor.h:448
 Functor.h:449
 Functor.h:450
 Functor.h:451
 Functor.h:452
 Functor.h:453
 Functor.h:454
 Functor.h:455
 Functor.h:456
 Functor.h:457
 Functor.h:458
 Functor.h:459
 Functor.h:460
 Functor.h:461
 Functor.h:462
 Functor.h:463
 Functor.h:464
 Functor.h:465
 Functor.h:466
 Functor.h:467
 Functor.h:468
 Functor.h:469
 Functor.h:470
 Functor.h:471
 Functor.h:472
 Functor.h:473
 Functor.h:474
 Functor.h:475
 Functor.h:476
 Functor.h:477
 Functor.h:478
 Functor.h:479
 Functor.h:480
 Functor.h:481
 Functor.h:482
 Functor.h:483
 Functor.h:484
 Functor.h:485
 Functor.h:486
 Functor.h:487
 Functor.h:488
 Functor.h:489
 Functor.h:490
 Functor.h:491
 Functor.h:492
 Functor.h:493
 Functor.h:494
 Functor.h:495
 Functor.h:496
 Functor.h:497
 Functor.h:498
 Functor.h:499
 Functor.h:500
 Functor.h:501
 Functor.h:502
 Functor.h:503
 Functor.h:504
 Functor.h:505
 Functor.h:506
 Functor.h:507
 Functor.h:508
 Functor.h:509
 Functor.h:510
 Functor.h:511
 Functor.h:512
 Functor.h:513
 Functor.h:514
 Functor.h:515
 Functor.h:516
 Functor.h:517
 Functor.h:518
 Functor.h:519
 Functor.h:520
 Functor.h:521
 Functor.h:522
 Functor.h:523
 Functor.h:524
 Functor.h:525
 Functor.h:526
 Functor.h:527
 Functor.h:528
 Functor.h:529
 Functor.h:530
 Functor.h:531
 Functor.h:532
 Functor.h:533
 Functor.h:534
 Functor.h:535
 Functor.h:536
 Functor.h:537
 Functor.h:538
 Functor.h:539
 Functor.h:540
 Functor.h:541
 Functor.h:542
 Functor.h:543
 Functor.h:544
 Functor.h:545
 Functor.h:546
 Functor.h:547
 Functor.h:548
 Functor.h:549
 Functor.h:550
 Functor.h:551
 Functor.h:552
 Functor.h:553
 Functor.h:554
 Functor.h:555
 Functor.h:556
 Functor.h:557
 Functor.h:558
 Functor.h:559
 Functor.h:560
 Functor.h:561
 Functor.h:562
 Functor.h:563
 Functor.h:564
 Functor.h:565
 Functor.h:566
 Functor.h:567
 Functor.h:568
 Functor.h:569
 Functor.h:570
 Functor.h:571
 Functor.h:572
 Functor.h:573
 Functor.h:574
 Functor.h:575
 Functor.h:576
 Functor.h:577
 Functor.h:578
 Functor.h:579
 Functor.h:580
 Functor.h:581
 Functor.h:582
 Functor.h:583
 Functor.h:584
 Functor.h:585
 Functor.h:586
 Functor.h:587
 Functor.h:588
 Functor.h:589
 Functor.h:590
 Functor.h:591
 Functor.h:592
 Functor.h:593
 Functor.h:594
 Functor.h:595
 Functor.h:596
 Functor.h:597
 Functor.h:598
 Functor.h:599
 Functor.h:600
 Functor.h:601
 Functor.h:602
 Functor.h:603
 Functor.h:604
 Functor.h:605
 Functor.h:606
 Functor.h:607
 Functor.h:608
 Functor.h:609
 Functor.h:610
 Functor.h:611
 Functor.h:612
 Functor.h:613
 Functor.h:614
 Functor.h:615
 Functor.h:616
 Functor.h:617
 Functor.h:618
 Functor.h:619
 Functor.h:620
 Functor.h:621
 Functor.h:622
 Functor.h:623
 Functor.h:624
 Functor.h:625
 Functor.h:626
 Functor.h:627
 Functor.h:628
 Functor.h:629
 Functor.h:630
 Functor.h:631
 Functor.h:632
 Functor.h:633
 Functor.h:634
 Functor.h:635
 Functor.h:636
 Functor.h:637
 Functor.h:638
 Functor.h:639
 Functor.h:640
 Functor.h:641
 Functor.h:642
 Functor.h:643
 Functor.h:644
 Functor.h:645
 Functor.h:646
 Functor.h:647
 Functor.h:648
 Functor.h:649
 Functor.h:650
 Functor.h:651
 Functor.h:652
 Functor.h:653
 Functor.h:654
 Functor.h:655
 Functor.h:656
 Functor.h:657
 Functor.h:658
 Functor.h:659
 Functor.h:660
 Functor.h:661
 Functor.h:662
 Functor.h:663
 Functor.h:664
 Functor.h:665
 Functor.h:666
 Functor.h:667
 Functor.h:668
 Functor.h:669
 Functor.h:670
 Functor.h:671
 Functor.h:672
 Functor.h:673
 Functor.h:674
 Functor.h:675
 Functor.h:676
 Functor.h:677
 Functor.h:678
 Functor.h:679
 Functor.h:680
 Functor.h:681
 Functor.h:682
 Functor.h:683
 Functor.h:684
 Functor.h:685
 Functor.h:686
 Functor.h:687
 Functor.h:688
 Functor.h:689
 Functor.h:690
 Functor.h:691
 Functor.h:692
 Functor.h:693
 Functor.h:694
 Functor.h:695
 Functor.h:696
 Functor.h:697
 Functor.h:698
 Functor.h:699
 Functor.h:700
 Functor.h:701
 Functor.h:702
 Functor.h:703
 Functor.h:704
 Functor.h:705
 Functor.h:706
 Functor.h:707
 Functor.h:708
 Functor.h:709
 Functor.h:710
 Functor.h:711
 Functor.h:712
 Functor.h:713
 Functor.h:714
 Functor.h:715
 Functor.h:716
 Functor.h:717
 Functor.h:718
 Functor.h:719
 Functor.h:720
 Functor.h:721
 Functor.h:722
 Functor.h:723
 Functor.h:724
 Functor.h:725
 Functor.h:726
 Functor.h:727
 Functor.h:728
 Functor.h:729
 Functor.h:730
 Functor.h:731
 Functor.h:732
 Functor.h:733
 Functor.h:734
 Functor.h:735
 Functor.h:736
 Functor.h:737
 Functor.h:738
 Functor.h:739
 Functor.h:740
 Functor.h:741
 Functor.h:742
 Functor.h:743
 Functor.h:744
 Functor.h:745
 Functor.h:746
 Functor.h:747
 Functor.h:748
 Functor.h:749
 Functor.h:750
 Functor.h:751
 Functor.h:752
 Functor.h:753
 Functor.h:754
 Functor.h:755
 Functor.h:756
 Functor.h:757
 Functor.h:758
 Functor.h:759
 Functor.h:760
 Functor.h:761
 Functor.h:762
 Functor.h:763
 Functor.h:764
 Functor.h:765
 Functor.h:766
 Functor.h:767
 Functor.h:768
 Functor.h:769
 Functor.h:770
 Functor.h:771
 Functor.h:772
 Functor.h:773
 Functor.h:774
 Functor.h:775
 Functor.h:776
 Functor.h:777
 Functor.h:778
 Functor.h:779
 Functor.h:780
 Functor.h:781
 Functor.h:782
 Functor.h:783
 Functor.h:784
 Functor.h:785
 Functor.h:786
 Functor.h:787
 Functor.h:788
 Functor.h:789
 Functor.h:790
 Functor.h:791
 Functor.h:792
 Functor.h:793
 Functor.h:794
 Functor.h:795
 Functor.h:796
 Functor.h:797
 Functor.h:798
 Functor.h:799
 Functor.h:800
 Functor.h:801
 Functor.h:802
 Functor.h:803
 Functor.h:804
 Functor.h:805
 Functor.h:806
 Functor.h:807
 Functor.h:808
 Functor.h:809
 Functor.h:810
 Functor.h:811
 Functor.h:812
 Functor.h:813
 Functor.h:814
 Functor.h:815
 Functor.h:816
 Functor.h:817
 Functor.h:818
 Functor.h:819
 Functor.h:820
 Functor.h:821
 Functor.h:822
 Functor.h:823
 Functor.h:824
 Functor.h:825
 Functor.h:826
 Functor.h:827
 Functor.h:828
 Functor.h:829
 Functor.h:830
 Functor.h:831
 Functor.h:832
 Functor.h:833
 Functor.h:834