A matrix \(a\) is circulant if all major diagonals, including
broken diagonals, are uniform; ie if
\(a_{ij}=a_{kl}\) when \(i-j=k-l\) (modulo
\(n\)). The standard values to use give 1:n for the top row.
In function is.circulant(), for arbitrary dimensional arrays,
the default value for dir checks that
a[v]==a[v+rep(1,d)]==...==a[v+rep((n-1),d)] for all v
(that is, following lines parallel to the major diagonal); indices are
passed through process().
For general dir, function is.circulant() checks that
a[v]==a[v+dir]==a[v+2*dir]==...==a[v+(n-1)*d] for all
v.
A Toeplitz matrix is one in which a[i,j]=a[i',j']
whenever |i-j|=|i'-j'|. See function toeplitz() of the
stats package for details.