mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 04:43:03 +03:00
std::unordered_set replaces std::set for m_seenPosition.
This commit is contained in:
parent
4eaf58f100
commit
381c3f64d8
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user