Converts a fast transform created by fort()
to the equivalent matrix form.
Usage
# S3 method for FastTransform
as.matrix(x, ...)
Arguments
- x
An object of class FastTransform
, created using fort()
.
- ...
Extra parameters (ignored).
Value
A matrix
object equivalent to x.
Examples
fast_transform <- fort(4, 15)
slow_transform <- as.matrix(fast_transform)
fast_result <- fast_transform %*% diag(4)
slow_result <- slow_transform %*% diag(4)
norm(fast_result - slow_result) # should be small
#> [1] 0