mosesdecoder/moses/LM/PointerState.h
2013-05-24 18:02:49 +01:00

22 lines
421 B
C++

#pragma once
#include "moses/FF/FFState.h"
namespace Moses
{
struct PointerState : public FFState {
const void* lmstate;
PointerState(const void* lms) {
lmstate = lms;
}
int Compare(const FFState& o) const {
const PointerState& other = static_cast<const PointerState&>(o);
if (other.lmstate > lmstate) return 1;
else if (other.lmstate < lmstate) return -1;
return 0;
}
};
} // namespace