std::unordered_set replaces std::set for m_seenPosition.

This commit is contained in:
mliska 2014-10-21 11:44:31 +02:00
parent 4eaf58f100
commit 381c3f64d8
2 changed files with 4 additions and 2 deletions

View File

@ -223,7 +223,7 @@ Hypothesis *BackwardsEdge::CreateHypothesis(const Hypothesis &hypothesis, const
bool
BackwardsEdge::SeenPosition(const size_t x, const size_t y)
{
std::set< int >::iterator iter = m_seenPosition.find((x<<16) + y);
boost::unordered_set< int >::iterator iter = m_seenPosition.find((x<<16) + y);
return (iter != m_seenPosition.end());
}

View File

@ -33,6 +33,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "TypeDef.h"
#include "WordsBitmap.h"
#include <boost/unordered_set.hpp>
namespace Moses
{
@ -165,7 +167,7 @@ private:
const SquareMatrix &m_futurescore;
std::vector< const Hypothesis* > m_hypotheses;
std::set< int > m_seenPosition;
boost::unordered_set< int > m_seenPosition;
// We don't want to instantiate "empty" objects.
BackwardsEdge();