IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
TableRefiner.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/TableRefiner.h
3
* \brief A lookup based particle refiner
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*/
7
8
#ifndef IMPCORE_TABLE_REFINER_H
9
#define IMPCORE_TABLE_REFINER_H
10
11
#include <IMP/core/core_config.h>
12
13
#include <
IMP/Refiner.h
>
14
#include <
IMP/refiner_macros.h
>
15
#include <
IMP/base/map.h
>
16
IMPCORE_BEGIN_NAMESPACE
17
18
//! A lookup based particle refiner
19
/** Each particle is refined by returning the list
20
of particles stored for it in a table.
21
*/
22
class
IMPCOREEXPORT
TableRefiner
:
public
Refiner
23
{
24
IMP::base::map<Particle*, Particles>
map_;
25
public
:
26
//! Initialize it with an empty table
27
TableRefiner
();
28
29
//! Add a mapping to the table
30
void
add_particle
(
Particle
*p,
const
ParticlesTemp &ps);
31
32
//! Remove a mapping from the table
33
void
remove_particle(
Particle
*p);
34
35
//! Set the mapping for a particular particle
36
void
set_particle(
Particle
*p,
const
ParticlesTemp &ps);
37
38
IMP_REFINER
(
TableRefiner
);
39
};
40
41
42
IMPCORE_END_NAMESPACE
43
44
#endif
/* IMPCORE_TABLE_REFINER_H */