9#include <string/LinearString.h>
25 template <
class SymbolType >
27 res.insert ( indexedStringSize - trie.
getData ( ) );
30 accumulateResult ( child.second,
res, indexedStringSize );
34 template <
class SymbolType >
36 if ( haystackPosition + needle.
getContent ( ).size ( ) > haystack.size ( ) )
39 for (
unsigned i = validSymbols;
i < needle.
getContent ( ).size ( );
i++ ) {
40 if ( needle.
getContent ( ) [
i ] != haystack [ haystackPosition +
i ] )
53 template <
class SymbolType >
58template <
class SymbolType >
64 unsigned indexedStringSize = positionHeap.
getString ( ).getContent ( ).size ( );
66 for (
const SymbolType & symbol :
string.getContent ( ) ) {
69 common::Streams::log <<
"on path possible occ (raw, string index): (" <<
node->getData ( ) <<
", " << indexedStringSize -
node->getData ( ) <<
")" << std::endl;
71 if ( checkOcc (
string, depth, positionHeap.
getString ( ).getContent ( ), indexedStringSize -
node->getData ( ) ) )
72 res.insert ( indexedStringSize -
node->getData ( ) );
74 auto iter =
node->getChildren ( ).find ( symbol );
75 if ( iter ==
node->getChildren ( ).end ( ) )
79 node = & iter->second;
82 accumulateResult ( *
node,
res, indexedStringSize );
static bool verbose
Verbose flag. Some algorithms print additional runtime information about internal datastructures or t...
Definition: GlobalData.h:24
static ext::reference_wrapper< ext::ostream > log
Standard loging stream. Mapped to descriptor 4.
Definition: GlobalData.h:78
Class introducing a trie with interface trying to be close to the interface of standard library conta...
Definition: trie.hpp:47
ext::map< Key, trie > & getChildren()
Getter of children of the root node.
Definition: trie.hpp:115
Value & getData()
Getter of the value in the root node.
Definition: trie.hpp:95
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Position heap string index. Tree like representation of all suffixes. The suffixes are themselves rep...
Definition: PositionHeap.h:56
const ext::trie< SymbolType, unsigned > & getRoot() const &
Definition: PositionHeap.h:203
const string::LinearString< SymbolType > & getString() const &
Definition: PositionHeap.h:213
Linear string.
Definition: LinearString.h:57
const ext::vector< SymbolType > & getContent() const &
Definition: LinearString.h:238
Definition: PositionHeapFactors.h:24
static ext::set< unsigned > query(const indexes::stringology::PositionHeap< SymbolType > &positionHeap, const string::LinearString< SymbolType > &string)
Definition: PositionHeapFactors.h:59
int i
Definition: AllEpsilonClosure.h:118
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
return res
Definition: MinimizeByPartitioning.h:145
Definition: ArithmeticCompression.h:18