IMP logo
IMP Reference Guide  2.21.0
The Integrative Modeling Platform
IMP::Refiner Class Referenceabstract

Abstract class to implement hierarchical methods. More...

#include <IMP/Refiner.h>

+ Inheritance diagram for IMP::Refiner:

Detailed Description

Abstract class to implement hierarchical methods.

The job of this class is to take a single particle and, if appropriate, return a list of particles. These lists can reflect existing relationships, such as the IMP::core::LeavesRefiner, or arbitrary relationships set up for a particular purpose, such as IMP::core::TableRefiner.

Note
it is assumed that refined particles belong to the same model as the coarse particle

Definition at line 34 of file Refiner.h.

Public Member Functions

 Refiner (std::string name="Refiner %1%", bool is_by_ref=false)
 Constructs the refiner. More...
 
virtual bool get_can_refine (Particle *) const
 Return true if this refiner can refine that particle. More...
 
bool get_is_by_ref_supported ()
 
virtual unsigned int get_number_of_refined (Particle *a) const
 
virtual const ParticlesTemp get_refined (Particle *a) const =0
 Refine the passed particle into a set of particles. More...
 
virtual Particleget_refined (Particle *a, unsigned int i) const
 Get the ith refined particle. More...
 
virtual ParticleIndexes get_refined_indexes (Model *m, ParticleIndex pi) const
 Return the indexes of the particles returned by get_refined() More...
 
virtual ParticleIndexes const & get_refined_indexes_by_ref (Model *m, ParticleIndex pi) const
 Return the indexes of the particles returned by get_refined() More...
 
- Public Member Functions inherited from IMP::ParticleInputs
ModelObjectsTemp get_inputs (Model *m, const ParticleIndexes &pis) const
 Get the ModelObjects read when the given list of particles is used. More...
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
virtual VersionInfo get_version_info () const
 Get information about the module and version of the object. More...
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
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)
 
virtual std::string get_type_name () const
 

Iterating through the set of refined particles

Using iterators can be more efficient than using the bulk get_refined(), however it is not necessarily so.

typedef
internal::IndexingIterator
< Accessor > 
RefinedIterator
 
RefinedIterator refined_begin (Particle *a) const
 
RefinedIterator refined_end (Particle *a) const
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::ParticleInputs
virtual ModelObjectsTemp do_get_inputs (Model *m, const ParticleIndexes &pis) const =0
 Overload this method to specify the inputs. More...
 
- Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

Constructor & Destructor Documentation

IMP::Refiner::Refiner ( std::string  name = "Refiner %1%",
bool  is_by_ref = false 
)

Constructs the refiner.

Parameters
nameobject name for refiner
is_by_refif true, this refiner is expected to support the get_refined_indexes_by_ref method, for refiners that support faster cached list of particles, etc.

Member Function Documentation

virtual bool IMP::Refiner::get_can_refine ( Particle ) const
virtual

Return true if this refiner can refine that particle.

This should not throw, so be careful what fields are touched.

Reimplemented in IMP::core::TableRefiner, IMP::core::ChildrenRefiner, IMP::core::FixedRefiner, IMP::core::LeavesRefiner, IMP::atom::BondEndpointsRefiner, and IMP::multifit::RigidLeavesRefiner.

Definition at line 52 of file Refiner.h.

bool IMP::Refiner::get_is_by_ref_supported ( )

returns true if this refiner supports get_refined_indexes_by_ref() (e.g. FixedRefiner)

Definition at line 94 of file Refiner.h.

virtual unsigned int IMP::Refiner::get_number_of_refined ( Particle a) const
virtual

As a precondition can_refine_particle(a) should be true.

Definition at line 105 of file Refiner.h.

virtual const ParticlesTemp IMP::Refiner::get_refined ( Particle a) const
pure virtual

Refine the passed particle into a set of particles.

As a precondition can_refine_particle(a) should be true.

Parameters
acoarse particle to be refined

Implemented in IMP::core::FixedRefiner, IMP::core::TableRefiner, IMP::core::ChildrenRefiner, IMP::core::LeavesRefiner, IMP::atom::BondEndpointsRefiner, and IMP::multifit::RigidLeavesRefiner.

virtual Particle* IMP::Refiner::get_refined ( Particle a,
unsigned int  i 
) const
virtual

Get the ith refined particle.

As a precondition can_refine_particle(a) should be true.

Definition at line 99 of file Refiner.h.

virtual ParticleIndexes IMP::Refiner::get_refined_indexes ( Model m,
ParticleIndex  pi 
) const
virtual

Return the indexes of the particles returned by get_refined()

Return the indexes of the particles returned by get_refined() for particle pi in model m.

Parameters
m,pimodel and particle index of coarse particle to be refined
Note
assumes that the refined particles are also in model m

Reimplemented in IMP::core::FixedRefiner.

virtual ParticleIndexes const& IMP::Refiner::get_refined_indexes_by_ref ( Model m,
ParticleIndex  pi 
) const
virtual

Return the indexes of the particles returned by get_refined()

Return the indexes of the particles returned by get_refined() for particle pi in model m by reference (possibly faster).

Parameters
m,pimodel and particle index of coarse particle to be refined
Note
assumes that get_is_by_ref() is true.
assumes that the refined particles are also in model m

Reimplemented in IMP::core::FixedRefiner.

Definition at line 82 of file Refiner.h.


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