IMP logo
Public Member Functions | Static Public Member Functions
IMP::container::SingletonContainerSet Class Reference

Detailed Description

Stores a set of SingletonContainers.

The input sets must be disjoint. This can change if there is demand for it.

Note:
The maintenance of the invariant is done by an associated IMP::Constraint. As a result, the state is only guaranteed to be correct either during model evaluation, or immediately following model evaluation before any particles have been changed.
+ Inheritance diagram for IMP::container::SingletonContainerSet:

List of all members.

Public Member Functions

 SingletonContainerSet (Model *m, std::string name="SingletonContainerSet %1%")
 Construct and empty set.
 SingletonContainerSet (const SingletonContainersTemp &pc, std::string name="SingletonContainerSet %1%")
void apply (const SingletonModifier *sm) const
 Apply a SingletonModifier to the contents.
void apply (const SingletonDerivativeModifier *sm, DerivativeAccumulator &da) const
 Apply a SingletonModifier to the contents.
double evaluate (const SingletonScore *s, DerivativeAccumulator *da) const
 Evaluate a score on the contents.
double evaluate_if_good (const SingletonScore *s, DerivativeAccumulator *da, double max) const
 Evaluate a score on the contents.
ParticlesTemp get_all_possible_particles () const
 Get contained particles.
bool get_contains_particle (Particle *) const
bool get_is_changed () const
template<class SM >
void template_apply (const SM *sm, DerivativeAccumulator &da) const
template<class SM >
void template_apply (const SM *sm) const
template<class SS >
double template_evaluate (const SS *s, DerivativeAccumulator *da) const
template<class SS >
double template_evaluate_if_good (const SS *s, DerivativeAccumulator *da, double max) const
- Public Member Functions inherited from IMP::SingletonContainer
virtual unsigned int get_number_of_particles () const
 return the number of Singletons in the container
virtual Particleget_particle (unsigned int i) const
ParticlesTemp get_particles () const
- Public Member Functions inherited from IMP::Container
virtual void do_after_evaluate (DerivativeAccumulator *accpt)
 Reset changed status.
virtual ParticlesTemp get_input_particles () const
 Return get_all_possible_particles()
virtual bool get_is_decomposable () const
virtual ContainersTemp get_output_containers () const
 Containers don't have output.
virtual ParticlesTemp get_output_particles () const
 Containers don't have output.
- Public Member Functions inherited from IMP::Constraint
 Constraint (Model *m, std::string name="Constraint %1%")
- Public Member Functions inherited from IMP::ScoreState
 ScoreState (Model *m, std::string name="ScoreState %1%")
void after_evaluate (DerivativeAccumulator *accpt)
void before_evaluate ()
virtual ContainersTemp get_input_containers () const =0
- Public Member Functions inherited from IMP::ModelObject
 ModelObject (Model *m, std::string name)
ModelObjectsTemp get_inputs () const
Modelget_model () const
ModelObjectsTemp get_outputs () const
- Public Member Functions inherited from IMP::base::Object
std::size_t __hash__ () const
virtual std::string get_type_name () const =0
 Return a string identifying the type of the object.
virtual IMP::base::VersionInfo get_version_info () const =0
 Get information about the module and version of the object.
void set_check_level (CheckLevel l)
void set_log_level (LogLevel l)
 Set the logging level used in this object.
void set_was_used (bool tf) const
void show (std::ostream &out=std::cout) const
const std::string & get_name () const
void set_name (std::string name)

Static Public Member Functions

static SingletonContainerSetget_from (IMP::base::Object *o)

Methods to control the nested container

This container merges a set of nested containers. To add or remove nested containers, use the methods below.

void remove_singleton_container (SingletonContainer *d)
template<class F >
void remove_singleton_containers_if (const F &f)
template<class List >
void remove_singleton_containers (List d)
template<class List >
void set_singleton_containers (List ps)
template<class List >
void set_singleton_containers_order (List ps)
unsigned int add_singleton_container (SingletonContainer *obj)
template<class List >
void add_singleton_containers (List objs)
void clear_singleton_containers ()
unsigned int get_number_of_singleton_containers () const
bool get_has_singleton_containers () const
SingletonContainerget_singleton_container (unsigned int i) const
SingletonContainers get_singleton_containers () const
void reserve_singleton_containers (unsigned int sz)
SingletonContainerIterator singleton_containers_begin ()
SingletonContainerIterator singleton_containers_end ()
SingletonContainerConstIterator singleton_containers_begin () const
SingletonContainerConstIterator singleton_containers_end () const

Additional Inherited Members

- Public Types inherited from IMP::SingletonContainer
typedef ParticleIndex ContainedIndexType
typedef ParticleIndexes ContainedIndexTypes
typedef ParticleContainedType
typedef ParticlesTemp ContainedTypes
- Protected Member Functions inherited from IMP::SingletonContainer
 SingletonContainer (Model *m, std::string name="SingletonContainer %1%")
- Protected Member Functions inherited from IMP::Container
 Container (Model *m, std::string name="Container %1%")
void set_is_changed (bool tf)
 This will be reset at the end of evaluate.

Constructor & Destructor Documentation

IMP::container::SingletonContainerSet::SingletonContainerSet ( Model m,
std::string  name = "SingletonContainerSet %1%" 
)

Construct and empty set.


Member Function Documentation

void IMP::container::SingletonContainerSet::apply ( const SingletonModifier sm) const
virtual

Apply a SingletonModifier to the contents.

Implements IMP::SingletonContainer.

void IMP::container::SingletonContainerSet::apply ( const SingletonDerivativeModifier sm,
DerivativeAccumulator da 
) const
virtual

Apply a SingletonModifier to the contents.

Implements IMP::SingletonContainer.

double IMP::container::SingletonContainerSet::evaluate ( const SingletonScore s,
DerivativeAccumulator da 
) const
virtual

Evaluate a score on the contents.

Implements IMP::SingletonContainer.

double IMP::container::SingletonContainerSet::evaluate_if_good ( const SingletonScore s,
DerivativeAccumulator da,
double  max 
) const
virtual

Evaluate a score on the contents.

Implements IMP::SingletonContainer.

ParticlesTemp IMP::container::SingletonContainerSet::get_all_possible_particles ( ) const
virtual

Get contained particles.

Get a list of all particles contained in this one, given that the input containers are up to date.

Implements IMP::Container.

bool IMP::container::SingletonContainerSet::get_contains_particle ( Particle v) const
virtual
Note:
This function may be linear. Be aware of the complexity bounds of your particular container.

Implements IMP::SingletonContainer.

bool IMP::container::SingletonContainerSet::get_is_changed ( ) const
virtual

Return true if the container changed since the last evaluate.

Reimplemented from IMP::Container.


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

Generated on Tue May 22 2012 23:33:29 for IMP by doxygen 1.8.1