ResperClot {resper} | R Documentation |
Sample from a set of permutations of points in time, where two elements cannot be juxtaposed if the lag between them is longer than a predefined time window
ResperClot(mat)
mat |
A Boolean or 0-1 matrix with a ```tube'' structure
following the rule:
i<j ==> A_{i,j+1} <= A_{i,j} <= A_{i+1,j} (for the Boolean matrix, replace <= with ==>). The rows and columns of the matrix can be interpreted as time points, and corresponds to the situations where the elements are time points, and a permutation is not valid if an element i occurs before another one j when t(i)>t(j)+delta |
. The matrix is given by the sequence and delta.
A sequence of values corresponding to the row indices of verb+t+.
The matrix is not checked for a tube structure when calling the function.
Johannes Hüsing
## No element may be shifted by more than two ## positions mat <- toeplitz(c(rep(1,3), rep(0,3))) perm <- ResperClot(mat) perm