10 #ifndef IMPMULTI_STATE_MULTI_STATE_MODEL_H
11 #define IMPMULTI_STATE_MULTI_STATE_MODEL_H
13 #include <IMP/multi_state/multi_state_config.h>
20 IMPMULTISTATE_BEGIN_NAMESPACE
26 states_.reserve(size);
31 void add_state(
unsigned int new_state) {
32 states_.push_back(new_state);
37 void set_score(
double score) { score_ = score; }
39 void set_zscore(
double score) { zscore_ = score; }
41 void replace_last_state(
unsigned int new_state) {
42 states_[states_.size()-1] = new_state;
49 double get_score()
const {
return score_; }
51 double get_zscore()
const {
return zscore_; }
53 unsigned int size()
const {
return states_.size(); }
55 unsigned int get_last_state()
const {
return states_.back(); }
57 friend std::ostream& operator<<(std::ostream& s,
const MultiStateModel& e) {
58 for(
unsigned int i=0; i<e.states_.size(); i++)
59 s << std::setw(4) << e.states_[i] <<
" ";
60 s << std::setw(6) << std::setprecision(4) << e.score_;
74 return (e1.get_score() < e2.get_score());
78 IMPMULTISTATE_END_NAMESPACE
A class for storing lists of IMP items.
Utility class to help sort MultiStateModel objects.
Keep track of multiple states.