Learn R Programming

rje (version 1.12.1)

fastMobius: Fast Moebius and inverse Moebius transforms

Description

Uses the fast method of Kennes and Smets (1990) to obtain Moebius and inverse Moebius transforms.

Usage

fastMobius(x, pad = FALSE)

invMobius(x, pad = FALSE)

Arguments

x

vector to transform

pad

logical, should vector not of length 2^k be padded with zeroes?

Functions

  • invMobius: inverse transform

Details

These are respectively equivalent to multiplying abs(subsetMatrix(k)) and subsetMatrix(k) by x, when x has length \(2^k\), but is much faster if \(k\) is large.

Examples

Run this code
x <- c(1,0,-1,2,4,3,2,1)
M <- subsetMatrix(3)
M %*% abs(M) %*% x
invMobius(fastMobius(x))

Run the code above in your browser using DataLab