# NOT RUN {
# construction
acf <- exp(-(1:5))
Toep <- Toeplitz(acf = acf)
# alternatively, can allocate space first
Toep <- Toeplitz(n = length(acf))
Toep$setAcf(acf = acf)
dim(Toep) # == c(nrow(Toep), ncol(Toep))
Toep # show method
Toep$getAcf() # extract the acf
# linear algebra
X <- matrix(rnorm(10), 5, 2)
Toep %*% X
t(X) %*% Toep
solve(Toep, X)
determinant(Toep) # log-determinant
# }
Run the code above in your browser using DataLab