Currently istoeplitz checks whether the operand is a Toeplitz matrix by constructing a full toeplitz matrix using toeplitz, and comparing the two. For large matrices it may be faster to iterate over the columns or row of the operand, comparing the cyclically shifted values directly. At minimum, it avoids another O(n^2) memory load.
Currently
istoeplitz
checks whether the operand is a Toeplitz matrix by constructing a full toeplitz matrix usingtoeplitz
, and comparing the two. For large matrices it may be faster to iterate over the columns or row of the operand, comparing the cyclically shifted values directly. At minimum, it avoids another O(n^2) memory load.