IMP logo

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:

Inheritance graph
[legend]

Public Member Functions

void apply (const SingletonModifier *sm, DerivativeAccumulator &da)
void apply (const SingletonModifier *sm)
double evaluate (const SingletonScore *s, DerivativeAccumulator *da) const
double evaluate_change (const SingletonScore *s, DerivativeAccumulator *da) const
double evaluate_prechange (const SingletonScore *s, DerivativeAccumulator *da) const
ParticlesTemp get_contained_particles () const
bool get_contained_particles_changed () const
bool get_contains_particle (Particle *p) const
ContainersTemp get_input_containers () const
unsigned int get_number_of_particles () const
Particleget_particle (unsigned int i) const
virtual std::string get_type_name () const
virtual ::IMP::VersionInfo get_version_info () const
 SingletonContainerSet (const SingletonContainers &in, std::string name="SingletonContainerSet %1%")
 SingletonContainerSet (std::string name="SingletonContainerSet %1%")
 Construct and empty set.

Static Public Member Functions

static SingletonContainerSetcreate_untracked_container ()

Methods to control the nested container

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

unsigned int add_singleton_container (SingletonContainer *obj)
void add_singleton_containers (const SingletonContainers &obj)
void clear_singleton_containers ()
bool get_has_singleton_containers () const
 return true if there are any objects in the container
unsigned int get_number_of_singleton_containers () const
SingletonContainerget_singleton_container (unsigned int i) const
void remove_singleton_container (SingletonContainer *d)
 Remove any occurences of d from the container.
void remove_singleton_containers (const SingletonContainers &d)
 Remove any occurences of each item in d.
template<class F >
void remove_singleton_containers_if (const F &f)
 Remove any occurrences for which f is true.
void reserve_singleton_containers (unsigned int sz)
void set_singleton_containers (const SingletonContainers &ps)
SingletonContainerConstIterator singleton_containers_begin () const
SingletonContainerIterator singleton_containers_begin ()
SingletonContainerConstIterator singleton_containers_end () const
SingletonContainerIterator singleton_containers_end ()

Friends

template<class T >
void IMP::internal::unref (T *)

Member Function Documentation

unsigned int IMP::container::SingletonContainerSet::add_singleton_container ( SingletonContainer obj  ) 

Returns:
index of object within the object

void IMP::container::SingletonContainerSet::add_singleton_containers ( const SingletonContainers obj  ) 

Add several objects to the container. They are not necessarily added at the end.

SingletonContainer* IMP::container::SingletonContainerSet::get_singleton_container ( unsigned int  i  )  const

Get the object refered to by the index

Exceptions:
IndexException in Python if the index is out of range

void IMP::container::SingletonContainerSet::set_singleton_containers ( const SingletonContainers ps  ) 

Set the contents of the container to ps removing all its current contents.


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

Generated on Mon Mar 8 23:08:54 2010 for IMP by doxygen 1.5.8