IMP logo

IMP::domino::MappedDiscreteSet Class Reference


Detailed Description

MappedDiscreteSet.
Inheritance diagram for IMP::domino::MappedDiscreteSet:

Inheritance graph
[legend]

Public Member Functions

void add_mapped_state (Particle *sampled_p, Particle *state)
 Add a new state to the set.
Particleget_mapped_state (Particle *p_target, long state_ind) const
 Get a state.
Float get_mapped_state_val (Particle *p_target, long state_ind, IMP::FloatKey key) const
 Get a value of an attribute of a state.
long get_number_of_mapped_states (Particle *p_target) const
 Get the number of states held in the set.
Particles get_particles () const
bool is_valid () const
 Check if each particle has mapped states.
 MappedDiscreteSet (Particles *ps_target, const std::vector< FloatKey > &atts)
 Create the discrete set.
 MappedDiscreteSet (const Particles &ps_target)
 Constructor.
void show (std::ostream &out=std::cout) const

Protected Attributes

std::map< Particle *, Particlesstates_map_

Constructor & Destructor Documentation

IMP::domino::MappedDiscreteSet::MappedDiscreteSet ( const Particles ps_target  ) 

Constructor.

/param[in] ps_target particles to be mapped on a discrete set

IMP::domino::MappedDiscreteSet::MappedDiscreteSet ( Particles ps_target,
const std::vector< FloatKey > &  atts 
)

Create the discrete set.

Parameters:
[in] ps_target the set of particles to be mapped on a discrete set
[in] atts the attributes for the states held in the set


Member Function Documentation

void IMP::domino::MappedDiscreteSet::add_mapped_state ( Particle sampled_p,
Particle state 
)

Add a new state to the set.

Exceptions:
if the new state does not have values for all of the attributes of the set.
Parameters:
[in] sampled_p The sampled particle
[in] state A state the sampled particle can have.

Particle* IMP::domino::MappedDiscreteSet::get_mapped_state ( Particle p_target,
long  state_ind 
) const

Get a state.

Parameters:
[in] state_ind the index of the state
[in] p_target 
Exceptions:
if the state_ind is out of range

Float IMP::domino::MappedDiscreteSet::get_mapped_state_val ( Particle p_target,
long  state_ind,
IMP::FloatKey  key 
) const

Get a value of an attribute of a state.

Parameters:
[in] p_target the target particle
[in] state_ind the index of the state
[in] key the key of the attribute
Exceptions:
if the state_ind is out of range or if the attribute is not sampled in the set.


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

Generated on Mon Mar 8 23:09:00 2010 for IMP by doxygen 1.5.8