Skip to content
Snippets Groups Projects
Commit f9f37399 authored by Radovan Červený's avatar Radovan Červený
Browse files

fixed BNDM comments

parent b9bfb0bb
No related branches found
No related tags found
1 merge request!16BP_cervera3 - algorithms
...@@ -69,7 +69,7 @@ std::set < unsigned > BackwardNondeterministicDAWGMatching::matchTemplate ( cons ...@@ -69,7 +69,7 @@ std::set < unsigned > BackwardNondeterministicDAWGMatching::matchTemplate ( cons
// Yay, there is match!!! // Yay, there is match!!!
occ.insert ( posInSubject ); occ.insert ( posInSubject );
} else { } else {
// if the pattern is longer then BITMASK_BIT_COUNT characters switch to brute force check // if the pattern is longer then BitmaskBitCount characters switch to brute force check
size_t k = bitmaskLength; size_t k = bitmaskLength;
   
while ( k < pattern.getContent ( ).size ( ) && pattern.getContent ( ).at ( k ) == subject.getContent ( ).at ( posInSubject + k ) ) k++; while ( k < pattern.getContent ( ).size ( ) && pattern.getContent ( ).at ( k ) == subject.getContent ( ).at ( posInSubject + k ) ) k++;
......
...@@ -17,7 +17,7 @@ namespace stringology { ...@@ -17,7 +17,7 @@ namespace stringology {
namespace exact { namespace exact {
   
/** /**
* Implementation of Backward Nondeterministic DAWG Matching using bit parallelism with 64bit bitmask and brute force switch for longer patterns. * Implementation of Backward Nondeterministic DAWG Matching using bit parallelism with 32/64/128bit bitmask and brute force switch for longer patterns.
*/ */
class BackwardNondeterministicDAWGMatching : public std::DoubleDispatch < std::set < unsigned >, string::StringBase, string::StringBase > { class BackwardNondeterministicDAWGMatching : public std::DoubleDispatch < std::set < unsigned >, string::StringBase, string::StringBase > {
private: private:
...@@ -32,6 +32,7 @@ private: ...@@ -32,6 +32,7 @@ private:
static std::set < unsigned > matchTemplate ( const string::LinearString & subject, const string::LinearString & pattern ); static std::set < unsigned > matchTemplate ( const string::LinearString & subject, const string::LinearString & pattern );
public: public:
   
// Defaults to 32 bits
static std::set < unsigned > match ( const string::String & subject, const string::String & pattern ); static std::set < unsigned > match ( const string::String & subject, const string::String & pattern );
static std::set < unsigned > match ( const string::LinearString & subject, const string::LinearString & pattern ); static std::set < unsigned > match ( const string::LinearString & subject, const string::LinearString & pattern );
   
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment