Differential Evolution C++ library
de::objective_function_factory< T > Class Template Reference

#include <processors.hpp>

List of all members.

Public Types

typedef boost::shared_ptr< T > T_ptr

Public Member Functions

virtual ~objective_function_factory ()
virtual T_ptr make ()=0

Detailed Description

template<typename T>
class de::objective_function_factory< T >

Interface to an objective function factory. If the objective function requires that a different instance be passed to each processor, create a concrete objective_function_factory derived from this class and implement the virtual make method to create a new instance of the objective function.

Use a reference or shared_ptr to an objective_function_exception as processors template argument, and pass the corresponding object as constructor argument.

The corresponding processor_traits class above will ensure that the right behavior is applied.

The template argument T is the type of the objective function

Author:
adrian (12/15/2011)

Member Typedef Documentation

template<typename T>
typedef boost::shared_ptr< T > de::objective_function_factory< T >::T_ptr

Defines a type pointer to an objective function


Constructor & Destructor Documentation

template<typename T>
virtual de::objective_function_factory< T >::~objective_function_factory ( ) [inline, virtual]

virtual distructor

Author:
adrian (12/15/2011)

Member Function Documentation

template<typename T>
virtual T_ptr de::objective_function_factory< T >::make ( ) [pure virtual]

Method implemented in derived classes that will create new instances of the objective function

Author:
adrian (12/15/2011)
Returns:
T_ptr a smart pointer to the objective function

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