Skip to contents

Given a FastTransform object x, t returns the transpose of x. If x represents an orthonormal transformation (i.e., if x$invertible is TRUE), then a FastTransform object (representing the transpose of x) will be returned; otherwise, a matrix object (representing the transpose of x) will be returned, with a warning.

Usage

# S3 method for FastTransform
t(x)

Arguments

x

An object of class FastTransform, created using fort().

Value

Either an object of class FastTransform (if x$invertible is TRUE) or a matrix.

Examples

(a <- fort(4))
#> fort linear operation: R^4 -> [fft2] -> R^4
(b <- t(t(a))) # transpose a twice
#> fort linear operation: R^4 -> [fft2] -> R^4
# the result below should be close to zero
sum((a %*% diag(4) - b %*% diag(4))^2)
#> [1] 0