2013-02-21 18:48:23 +04:00
|
|
|
#pragma once
|
|
|
|
|
2013-05-24 21:02:49 +04:00
|
|
|
#include "moses/FF/FFState.h"
|
2013-02-21 18:48:23 +04:00
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2013-02-21 18:48:23 +04:00
|
|
|
PointerState(const void* lms) {
|
|
|
|
lmstate = lms;
|
|
|
|
}
|
2015-10-08 19:14:08 +03:00
|
|
|
virtual size_t hash() const {
|
2015-10-16 15:53:33 +03:00
|
|
|
return (size_t) lmstate;
|
2015-10-08 19:14:08 +03:00
|
|
|
}
|
2015-10-16 15:53:33 +03:00
|
|
|
virtual bool operator==(const FFState& other) const {
|
2015-10-12 18:11:25 +03:00
|
|
|
const PointerState& o = static_cast<const PointerState&>(other);
|
2015-10-08 20:14:52 +03:00
|
|
|
return lmstate == o.lmstate;
|
|
|
|
}
|
2015-10-08 19:14:08 +03:00
|
|
|
|
2013-02-21 18:48:23 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|