-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhypothesis.h
48 lines (40 loc) · 821 Bytes
/
hypothesis.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// -*- C++ -*-
#ifndef __HYPOTHESIS_H__
#define __HYPOTHESIS_H__
#include <string>
#include <bitset>
#include <list>
#include "split.h"
class hypothesis{
public:
hypothesis();
~hypothesis();
int len();
void setparent( hypothesis* );
void settrans( std::string& );
void GetOpt(std::string& );
int GetDepth();
std::string FullPath();
void setphrases( phrase& );
std::string GetHistory();
int nextphrase();
void setexpand();
bool expand();
std::bitset<64> cover() const;
void setscore( float s ) {
m_score = s;
}
float getscore( ) const {
return m_score;
}
private:
bool stest();
bool m_bexpand;
std::string m_stropt;
std::bitset<64> m_cover;
int m_end;
std::list<hypothesis*> m_parent;
hypothesis* m_history;
double m_score;
};
#endif //__HYPOTHESIS_H__