mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
29 lines
485 B
C++
29 lines
485 B
C++
#pragma once
|
|
|
|
#include "moses/FF/FFState.h"
|
|
|
|
namespace Moses
|
|
{
|
|
|
|
struct PointerState : public FFState {
|
|
const void* lmstate;
|
|
|
|
explicit PointerState() {
|
|
// uninitialised
|
|
}
|
|
|
|
PointerState(const void* lms) {
|
|
lmstate = lms;
|
|
}
|
|
virtual size_t hash() const {
|
|
return (size_t) lmstate;
|
|
}
|
|
virtual bool operator==(const FFState& other) const {
|
|
const PointerState& o = static_cast<const PointerState&>(other);
|
|
return lmstate == o.lmstate;
|
|
}
|
|
|
|
};
|
|
|
|
} // namespace
|