/src/aspell/modules/speller/default/matrix.hpp
Line | Count | Source |
1 | | #ifndef __aspeller_matrix_hh__ |
2 | | #define __aspeller_matrix_hh__ |
3 | | |
4 | | #include <vector> |
5 | | |
6 | | namespace aspeller { |
7 | | |
8 | | class ShortMatrix { |
9 | | int x_size; |
10 | | int y_size; |
11 | | short * data; |
12 | | public: |
13 | 3.14M | void init(int sx, int sy, short * d) {x_size = sx; y_size = sy; data = d;} |
14 | 1.98k | ShortMatrix() {} |
15 | 3.14M | ShortMatrix(int sx, int sy, short * d) {init(sx,sy,d);} |
16 | 74.6M | short operator() (int x, int y) const {return data[x + y*x_size];} |
17 | 1.66G | short & operator() (int x, int y) {return data[x + y*x_size];} |
18 | | }; |
19 | | |
20 | | } |
21 | | |
22 | | #endif |