source: src/dgp/mgraph.hh

Last change on this file was e7de6cc, checked in by Tomasz Obrebski <to@…>, 12 years ago

new version of dgp
added dgc, tre and compdic components
compiledic renamed to compdic_utf8
./configure updated

  • Property mode set to 100644
File size: 569 bytes
Line 
1#ifndef _MGRAPH_HH
2#define _MGRAPH_HH
3
4#include <vector>
5
6#include "const.hh"
7#include "thesymbols.hh"
8#include "../common/common.h"
9
10
11using namespace std;
12
13class MNode
14{
15public:
16
17  int            pos;
18  char           form[256];
19  Cat            cat;
20  vector<int>    pred;
21  vector<int>    snodes;
22
23  void           clear() { snodes.clear(); };
24};
25 
26class MGraph
27{
28public:
29
30  void clear() { nodes.clear(); }
31  int size() { return nodes.size(); }
32  int add_node(char* seg);
33  MNode& operator[](int i) { return nodes[i]; }
34
35private:
36
37  vector<MNode> nodes;
38
39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.