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
RevLine 
[5f4d9c3]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
[e7de6cc]10
11using namespace std;
12
[5f4d9c3]13class MNode
14{
15public:
16
17  int            pos;
[e7de6cc]18  char           form[256];
19  Cat            cat;
20  vector<int>    pred;
[5f4d9c3]21  vector<int>    snodes;
22
23  void           clear() { snodes.clear(); };
24};
[e7de6cc]25 
[5f4d9c3]26class MGraph
27{
[e7de6cc]28public:
[5f4d9c3]29
[e7de6cc]30  void clear() { nodes.clear(); }
31  int size() { return nodes.size(); }
[5f4d9c3]32  int add_node(char* seg);
[e7de6cc]33  MNode& operator[](int i) { return nodes[i]; }
34
35private:
36
37  vector<MNode> nodes;
38
[5f4d9c3]39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.