Mercurial > hg > silvet
comparison src/AgentFeederPoly.h @ 187:1697457458b7 noteagent
Don't retain returned hypotheses -- to avoid having to test whether we've seen them before
author | Chris Cannam |
---|---|
date | Wed, 28 May 2014 15:16:00 +0100 |
parents | 9b9cdfccbd14 |
children | 462b165c8c0f |
comparison
equal
deleted
inserted
replaced
186:9d70d687e4eb | 187:1697457458b7 |
---|---|
69 i != m_state.satisfied.end(); ++i) { | 69 i != m_state.satisfied.end(); ++i) { |
70 m_state.completed.push_back(*i); | 70 m_state.completed.push_back(*i); |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 std::set<Hypothesis> getAcceptedHypotheses() const { | 74 std::set<Hypothesis> retrieveAcceptedHypotheses() { |
75 std::set<Hypothesis> hs; | 75 std::set<Hypothesis> hs; |
76 for (typename Hypotheses::const_iterator i = m_state.completed.begin(); | 76 for (typename Hypotheses::const_iterator i = m_state.completed.begin(); |
77 i != m_state.completed.end(); ++i) { | 77 i != m_state.completed.end(); ++i) { |
78 hs.insert(*i); | 78 hs.insert(*i); |
79 } | 79 } |
80 m_state.completed.clear(); | |
80 return hs; | 81 return hs; |
81 } | 82 } |
82 | 83 |
83 private: | 84 private: |
84 State update(State s, AgentHypothesis::Observation o) { | 85 State update(State s, AgentHypothesis::Observation o) { |