TRF Language Model
wb-system.h
Go to the documentation of this file.
1 // You may obtain a copy of the License at
2 //
3 // http://www.apache.org/licenses/LICENSE-2.0
4 //
5 // Unless required by applicable law or agreed to in writing, software
6 // distributed under the License is distributed on an "AS IS" BASIS,
7 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 // See the License for the specific language governing permissions and
9 // limitations under the License.
10 //
11 // Copyright 2014-2015 Tsinghua University
12 // Author: wb.th08@gmail.com (Bin Wang), ozj@tsinghua.edu.cn (Zhijian Ou)
13 //
14 // All h, cpp, cc, and script files (e.g. bat, sh, pl, py) should include the above
15 // license declaration. Different coding language may use different comment styles.
16 
17 
25 #include "wb-log.h"
26 #include "wb-option.h"
27 #include "wb-file.h"
28 #include "wb-string.h"
29 #include "wb-vector.h"
30 #include "wb-lhash.h"
31 #include "wb-trie.h"
32 #include "wb-heap.h"
33 #include "wb-mat.h"
34 #include "wb-iter.h"
35 //#include "wb-win.h"
36 using namespace wb;
37 
38 #include <iostream>
39 #include <iomanip> // such as std::setw(10)
40 #include <fstream>
41 #include <cmath>
42 #include <algorithm>
43 #include <omp.h>
44 using namespace std;
45 
47 #define _wbMain int main(int _argc, char** _argv)
48 
50 #define ERROR(b) { cout<<b<<endl; return 0; }
51 
Define the trie structure.
heap, using a linear array. It can be used to sort values.
define the class String
a definition of a class Log, which can output to the cmd window and the log file simultaneously. In wb-log.cpp, there are a Log variable "lout", which can be directly used just like "cout". For example:
linear hash, using &#39;open address&#39; to handle collision
Define the option class.
define the file class
define all the code written by Bin Wang.
Definition: wb-file.cpp:21
Defination of simple dynamic array/stack/queue and so on.