00001
00002
00003
00004
00005
00006
00007
00008 #ifndef IMPDOMINO_DISCRETE_SET_H
00009 #define IMPDOMINO_DISCRETE_SET_H
00010
00011 #include "IMP/Particle.h"
00012 #include <map>
00013 #include <sstream>
00014 #include "IMP/base_types.h"
00015 #include "domino_config.h"
00016
00017 IMPDOMINO_BEGIN_NAMESPACE
00018
00019 class IMPDOMINOEXPORT DiscreteSet
00020 {
00021 public:
00022 DiscreteSet(){}
00023
00024
00025
00026 DiscreteSet(const std::vector<FloatKey> &atts);
00027
00028
00029
00030
00031 const std::vector<FloatKey> * get_att_keys() const {return &atts_;}
00032
00033 inline unsigned int get_number_of_attributes()const {
00034 return atts_.size();
00035 }
00036
00037
00038
00039
00040
00041
00042 void add_state(Particle* p);
00043
00044
00045
00046
00047
00048
00049
00050 Float get_state_val(long state_ind, IMP::FloatKey key) const;
00051
00052
00053
00054
00055
00056
00057 Particle * get_state(long state_ind) const;
00058 const Particles * get_states() const{return &states_;};
00059
00060
00061 inline long get_number_of_states() const { return states_.size();}
00062
00063 void show(std::ostream& out=std::cout) const;
00064 protected:
00065 Particles states_;
00066 std::vector<FloatKey> atts_;
00067 };
00068
00069 IMPDOMINO_END_NAMESPACE
00070
00071 #endif