imp
doc
wiki
download
groups
imp at salilab.org | contact
Main Page
Modules
Class Index
Methods and Variables
Class Hierarchy
Macros
Related Pages
build
include
IMP
Sampler.h
Go to the documentation of this file.
1
/**
2
* \file Sampler.h \brief Base class for all samplers.
3
*
4
* Copyright 2007-2012 IMP Inventors. All rights reserved.
5
*
6
*/
7
8
#ifndef IMPKERNEL_SAMPLER_H
9
#define IMPKERNEL_SAMPLER_H
10
11
#include "kernel_config.h"
12
#include "
Model.h
"
13
#include "Pointer.h"
14
#include "
ConfigurationSet.h
"
15
#include <
IMP/base/ref_counted_macros.h
>
16
17
IMP_BEGIN_NAMESPACE
18
19
//! Base class for all samplers.
20
/** A sampler takes a Model and searches for good configurations,
21
given the optimizeable parameters and the scoring function in
22
the Model and extra information that can be provided. Typically,
23
the current configuration of the model is ignore.
24
25
Typically a sampler works by using one or more Optimizer
26
types to search for configurations which minimize the scoring
27
function.
28
*/
29
class
IMPEXPORT
Sampler
:
public
IMP::base::Object
30
{
31
OwnerPointer<Model>
model_;
32
OwnerPointer<ScoringFunction>
sf_;
33
public
:
34
Sampler
(
Model
*m, std::string name=
"Sampler %1%"
);
35
36
ConfigurationSet
*get_sample()
const
;
37
38
ScoringFunction
*get_scoring_function()
const
{
39
return
sf_;
40
}
41
void
set_scoring_function(
ScoringFunctionInput
sf);
42
43
Model
*get_model()
const
{
return
model_;}
44
45
// for the vtable
46
IMP_REF_COUNTED_NONTRIVIAL_DESTRUCTOR
(
Sampler
);
47
protected
:
48
//! Subclasses should override this method
49
virtual
ConfigurationSet
* do_sample()
const
=0;
50
};
51
52
IMP_OBJECTS
(
Sampler
,Samplers);
53
54
IMP_END_NAMESPACE
55
56
#endif
/* IMPKERNEL_SAMPLER_H */
Generated on Tue May 22 2012 23:33:16 for IMP by
doxygen
1.8.1