mosesdecoder/moses/LM/PointerState.h

29 lines
485 B
C
Raw Permalink Normal View History

#pragma once
2013-05-24 21:02:49 +04:00
#include "moses/FF/FFState.h"
namespace Moses
{
struct PointerState : public FFState {
const void* lmstate;
2015-11-05 18:59:09 +03:00
2016-08-11 14:35:50 +03:00
explicit PointerState() {
// uninitialised
2015-11-05 18:59:09 +03:00
}
PointerState(const void* lms) {
lmstate = lms;
}
virtual size_t hash() const {
2015-10-16 15:53:33 +03:00
return (size_t) lmstate;
}
2015-10-16 15:53:33 +03:00
virtual bool operator==(const FFState& other) const {
const PointerState& o = static_cast<const PointerState&>(other);
return lmstate == o.lmstate;
}
};
} // namespace