File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,24 +45,24 @@ auto is_integer(auto a) {
45
45
}
46
46
47
47
string matches (string const & A, string const & B, char wild = ' *' ) {
48
- static const int sigma = 26 ;
49
- static point project[2 ][sigma];
48
+ static point project[2 ][128 ];
50
49
static bool init = false ;
51
50
if (!init) {
52
51
init = true ;
53
- for (int i = 0 ; i < sigma ; i++) {
52
+ for (int i = 0 ; i < 128 ; i++) {
54
53
project[0 ][i] = cp_algo::polar (1 ., (ftype)cp_algo::random::rng ());
55
54
project[1 ][i] = conj (project[0 ][i]);
56
55
}
57
56
}
57
+ project[0 ][wild] = project[1 ][wild] = 0 ;
58
58
vector<cvector> P;
59
59
P.emplace_back (size (A));
60
60
P.emplace_back (size (A));
61
61
for (auto [i, c]: A | views::enumerate) {
62
- P[0 ].set (i, (c != wild) * project[0 ][c - ' a ' ]);
62
+ P[0 ].set (i, project[0 ][c]);
63
63
}
64
64
for (auto [i, c]: B | views::reverse | views::enumerate) {
65
- P[1 ].set (i, (c != wild) * project[1 ][c - ' a ' ]);
65
+ P[1 ].set (i, project[1 ][c]);
66
66
}
67
67
cp_algo::checkpoint (" cvector fill" );
68
68
semicorr (P[0 ], P[1 ]);
You can’t perform that action at this time.
0 commit comments