IMP logo

IMP::QuadContainer Class Reference


Detailed Description

A shared container for particle_quads.

Stores a searchable shared collection of particle_quads.

Implementors
Developers who wish to implement a QuadContainer should inherit from this class and use the IMP_QUAD_CONTAINER() macro to help define the needed functions. Lamentably, we do not provide an example.
Inheritance diagram for IMP::QuadContainer:

Inheritance graph
[legend]

Public Member Functions

virtual void apply (const QuadModifier *sm, DerivativeAccumulator &da)=0
 Apply a SingletonModifier to the contents.
virtual void apply (const QuadModifier *sm)=0
 Apply a SingletonModifier to the contents.
virtual double evaluate (const QuadScore *s, DerivativeAccumulator *da) const =0
 Avaluate a score on the contents.
virtual bool get_contains_particle_quad (const ParticleQuad &v) const =0
virtual unsigned int get_number_of_particle_quads () const =0
 return the number of particle_quads in the container
virtual ParticleQuad get_particle_quad (unsigned int i) const =0
ParticleQuadsTemp get_particle_quads () const
ParticleQuadIterator particle_quads_begin () const
 begin iterating through the particle_quads
ParticleQuadIterator particle_quads_end () const
 iterate through the particle_quads
 QuadContainer (std::string name="QuadContainer %1%")
Incremental Scoring
When incremental scoring is used, the container keeps track of changes to it since the last Model::evaluate() call.
Warning: ParticleQuadContainer::get_removed_quads_container() has not been stabilized and is likely to change without notice.
The address of the objects returned should not change over the lifetime of this container (but, of course, their contents will).


virtual double evaluate_change (const QuadScore *o, DerivativeAccumulator *da) const =0
virtual double evaluate_prechange (const QuadScore *o, DerivativeAccumulator *da) const =0
QuadContainerget_added_quads_container () const
QuadContainerget_removed_quads_container () const

Protected Member Functions

void set_added_and_removed_containers (QuadContainer *added, QuadContainer *removed)

Friends

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

Member Function Documentation

virtual double IMP::QuadContainer::evaluate_change ( const QuadScore o,
DerivativeAccumulator da 
) const [pure virtual]

Return the change in score (and derivatives) since the last evaluate of the current contents of the container.

virtual double IMP::QuadContainer::evaluate_prechange ( const QuadScore o,
DerivativeAccumulator da 
) const [pure virtual]

Return the score of the last evaluate for the current contents of the container.

virtual bool IMP::QuadContainer::get_contains_particle_quad ( const ParticleQuad &  v  )  const [pure virtual]

Note:
This function may be linear. Be aware of the complexity bounds of your particular container.

virtual unsigned int IMP::QuadContainer::get_number_of_particle_quads (  )  const [pure virtual]

return the number of particle_quads in the container

Note:
this isn't always constant time

void IMP::QuadContainer::set_added_and_removed_containers ( QuadContainer added,
QuadContainer removed 
) [protected]

Containers must have containers that keep track of the particles which have been added or since the last step. These containers must be registered with the parent QuadContainer.

Containers which are themselves returned by the get_added/removed functions do not have to register such containers.


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

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