ng_find_matches: limit how big we're willing to go

Tests which require tracking more than 15K states (including edit
distance states) are very, very slow.
This commit is contained in:
Justin Viiret
2017-03-07 11:47:10 +11:00
committed by Matthew Barr
parent d2416736cb
commit 7ca81ff530
3 changed files with 21 additions and 7 deletions

View File

@@ -44,11 +44,15 @@ struct BoundaryReports;
} // namespace ue2
/** \brief Find all matches for a given graph when executed against \a input.
/**
* \brief Find all matches for a given graph when executed against \a input.
*
* Fills \a matches with offsets into the data stream where a match is found.
* Fills \a matches with offsets into the data stream where a match is found.
*
* Returns false if this graph is too large to find its matches in reasonable
* time.
*/
void findMatches(const ue2::NGHolder &g, const ue2::ReportManager &rm,
bool findMatches(const ue2::NGHolder &g, const ue2::ReportManager &rm,
const std::string &input,
std::set<std::pair<size_t, size_t>> &matches,
const unsigned int max_edit_distance, const bool notEod,