Class to create a Trie
object.
More...
#include "nn/nlib/succinct/Trie.h"
|
bool | Init () noexcept |
| Initializes an object. More...
|
|
Trie * | Build (ReallocVec< uint32_t > *keyids=NULL) noexcept |
| Creates a Trie object. More...
|
|
bool | AddWord (const char *str) noexcept |
| Adds a detection target string. More...
|
|
bool | AddPattern (const void *p, size_t n) noexcept |
| Adds detection target data. More...
|
|
bool | AddWords (const char *str, size_t len) noexcept |
| Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF). More...
|
|
bool | AddWords (const char *str) noexcept |
| Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF). More...
|
|
|
| TrieBuilder () noexcept |
| Instantiates the object.
|
|
| ~TrieBuilder () noexcept |
| Destructor.
|
|
Class to create a Trie
object.
- Description
- Add target strings or patterns using methods such as
AddWord
, and then create the Trie
object using the Build
function. The user must delete
the created Trie
object.
Definition at line 75 of file Trie.h.
◆ AddPattern()
nn::nlib::succinct::TrieBuilder::AddPattern |
( |
const void * |
p, |
|
|
size_t |
n |
|
) |
| |
|
noexcept |
Adds detection target data.
- Parameters
-
[in] | p | Pointer to data. |
[in] | n | Data size. |
- Returns
- Returns
true
when successful.
◆ AddWord()
nn::nlib::succinct::TrieBuilder::AddWord |
( |
const char * |
str | ) |
|
|
noexcept |
Adds a detection target string.
- Parameters
-
- Returns
- Returns
true
when successful.
◆ AddWords() [1/2]
nn::nlib::succinct::TrieBuilder::AddWords |
( |
const char * |
str, |
|
|
size_t |
len |
|
) |
| |
|
noexcept |
Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF).
- Parameters
-
[in] | str | Pointer to the string. |
[in] | len | The string length (the value of strlen). |
- Returns
- Returns
true
when successful.
◆ AddWords() [2/2]
nn::nlib::succinct::TrieBuilder::AddWords |
( |
const char * |
str | ) |
|
|
inlinenoexcept |
Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF).
- Parameters
-
[in] | str | Pointer to the string. |
- Returns
- Returns
true
when successful.
Definition at line 84 of file Trie.h.
◆ Build()
nn::nlib::succinct::TrieBuilder::Build |
( |
ReallocVec< uint32_t > * |
keyids = NULL | ) |
|
|
noexcept |
Creates a Trie
object.
- Parameters
-
[out] | keyids | Stores the ID assigned to the string. |
- Returns
- Pointer to the
Trie
object.
- Description
- Creates the
Trie
object.
◆ Init()
nn::nlib::succinct::TrieBuilder::Init |
( |
| ) |
|
|
noexcept |
Initializes an object.
- Returns
- Returns
true
when successful.
The documentation for this class was generated from the following files: