#include <dawg.h>
Definition at line 378 of file dawg.h.
◆ add_unique()
bool tesseract::DawgPositionVector::add_unique |
( |
const DawgPosition & |
new_pos, |
|
|
bool |
debug, |
|
|
const char * |
debug_msg |
|
) |
| |
|
inline |
Adds an entry for the given dawg_index with the given node to the vec. Returns false if the same entry already exists in the vector, true otherwise.
Definition at line 383 of file dawg.h.
384 {
385 for (auto &&position : *this) {
386 if (position == new_pos) {
387 return false;
388 }
389 }
390 push_back(new_pos);
391 if (debug) {
393 new_pos.dawg_index, new_pos.dawg_ref, new_pos.punc_ref,
394 new_pos.back_to_punc ? " returned" : "");
395 }
396 return true;
397 }
void tprintf(const char *format,...)
The documentation for this class was generated from the following file:
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/dict/dawg.h