IMP logo
Public Member Functions | Protected Member Functions
IMP::Sampler Class Reference

Detailed Description

Base class for all samplers.

A sampler takes a Model and searches for good configurations, given the optimizeable parameters and the scoring function in the Model and extra information that can be provided.

Typically a sampler works by using one or more Optimizer types to search for configurations which minimize the scoring function.

+ Inheritance diagram for IMP::Sampler:

List of all members.

Public Member Functions

 Sampler (Model *m, std::string name="Sampler %1%")
Modelget_model () const
ConfigurationSetget_sample () const

Macros to aid with implementing object classes

These macros are here to aid with implementing classes that inherit from the various abstract base classes in the kernel. Each IMP object class should use one of the IMP_OBJECT(), IMP_RESTRAINT() etc. macros in the body of its declaration as well as an IMP_OBJECTS() invocation on the namespace level (and an IMP_SWIG_OBJECTS() call in the corresponding swig file). See Value and Objects for a description of what it means to be an object vs a value in IMP.

Each IMP_OBJECT()/IMP_RESTRAINT()-style macro declares/defines the set of needed functions. The declared functions should be defined in the associated .cpp file. By using the macros, you ensure that your class gets the names of the functions correct and it makes it easier to update your class if the functions should change.

All of the IMP_OBJECT()/IMP_RESTRAINT()-style macros define the following methods:

  • IMP::Object::get_version_info()
  • an empty virtual destructor

In addition, they all declare:

  • IMP::Object::do_show()

For all macros, the Name parameter is the name of the class being implemented and the version_info parameter is the IMP::VersionInfo to use (probably get_version_info()).

#define IMP_SAMPLER(Name)
 Define the basic things you need for a Sampler.

Protected Member Functions

virtual ConfigurationSetdo_sample () const =0
 Subclasses should override this method.

Member Function Documentation

virtual ConfigurationSet* IMP::Sampler::do_sample ( ) const [protected, pure virtual]

Subclasses should override this method.


Friends And Related Function Documentation

#define IMP_SAMPLER (   Name) [related]
Value:
IMP_OBJECT(Name);                             \
protected:                                      \
 IMP_IMPLEMENT(ConfigurationSet* do_sample() const)

Define the basic things you need for a Sampler.

In addition to the methods done by IMP_OBJECT, it declares


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

Generated on Fri Feb 10 2012 23:36:21 for IMP by doxygen 1.7.5.1