OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
SamplingMethod.h
Go to the documentation of this file.
1 #ifndef OPAL_SAMPLING_METHOD_H
2 #define OPAL_SAMPLING_METHOD_H
3 
4 
6 
7 #include <boost/smart_ptr.hpp>
8 
9 #include "Comm/types.h"
10 #include "Util/CmdArguments.h"
11 
13 {
14 
15 public:
16  virtual ~SamplingMethod() {};
17  virtual void create(boost::shared_ptr<SampleIndividual>& ind, size_t i) = 0;
18 
29  virtual void allocate(const CmdArguments_t& args, const Comm::Bundle_t& comm) {
30  /* Some sampling methods require a container.
31  * In order to reduce memory only samplers should allocate
32  * the memory
33  */
34  }
35 };
36 
37 #endif
virtual void create(boost::shared_ptr< SampleIndividual > &ind, size_t i)=0
virtual ~SamplingMethod()
boost::shared_ptr< CmdArguments > CmdArguments_t
Definition: CmdArguments.h:169
virtual void allocate(const CmdArguments_t &args, const Comm::Bundle_t &comm)
bundles all communicators for a specific role/pid
Definition: types.h:14