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) {
4545}
4646
4747string 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 ];
5049 static bool init = false ;
5150 if (!init) {
5251 init = true ;
53- for (int i = 0 ; i < sigma ; i++) {
52+ for (int i = 0 ; i < 128 ; i++) {
5453 project[0 ][i] = cp_algo::polar (1 ., (ftype)cp_algo::random::rng ());
5554 project[1 ][i] = conj (project[0 ][i]);
5655 }
5756 }
57+ project[0 ][wild] = project[1 ][wild] = 0 ;
5858 vector<cvector> P;
5959 P.emplace_back (size (A));
6060 P.emplace_back (size (A));
6161 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]);
6363 }
6464 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]);
6666 }
6767 cp_algo::checkpoint (" cvector fill" );
6868 semicorr (P[0 ], P[1 ]);
You can’t perform that action at this time.
0 commit comments