Computes list of n-gram elements positions in sequence.
Usage
get_ngrams_ind(len_seq, n, d)
Arguments
len_seq
integer value describing sequence's length.
n
integer size of n-gram.
d
integer vector of distances between elements of n-gram (0 means
consecutive elements). See Details.
Value
A list with number of elements equal to n. Every element is a
vector containing locations of given n-gram letter. For example, first element of
list contain indices of first letter of all n-grams. The attribute d
of output contains distances between letter used to compute locations
(see Details).
Details
A format of d vector is discussed in Details of
count_ngrams.