15 #ifndef DATA_CYKPARSER_CYKGRID_HPP 16 #define DATA_CYKPARSER_CYKGRID_HPP 33 typedef unordered_map< uint, ssgrammar_listofrules_t > cykparser_cykgrid_t;
36 cykparser_cykgrid_t cykgrid_;
46 inline uint
operator() (
const uint cc,
const uint x,
const uint y,
47 const uint rulepos ) {
52 inline void Add (
const uint cc,
const uint x,
const uint y,
53 const uint ruleidx ) {
63 inline std::size_t
size() {
64 return cykgrid_.size();
72 #endif //DATA_CYKPARSER_CYKGRID_HPP void reset()
Clear cyk grid.
const ssgrammar_listofrules_t & operator()(const uint cc, const uint x, const uint y)
Get list of grammar rules assigned to (cc,x,y)
void Add(const uint cc, const uint x, const uint y, const uint ruleidx)
Add a rule to the cyk grid at (cc,x,y)
std::size_t size()
Return actual size of the cyk grid.
std::basic_string< uint > ssgrammar_listofrules_t
functor that provides cykgrid access methods