Extends the vector to have length a power of 2 (if not already a power of 2) and then reflects it about its right end.
reflect(x)A list with two list elements: "x" containing the
extended-and-reflected signal; and "idx" containing the indices of the
original signal.
An n-vector.
The vector x is first reflected about both its left and right ends, by (roughly) the same amount each end, to make its length a power of 2 (if the length of x is already a power of 2 this step is skipped). Then the resulting vector is reflected about its right end to create a vector that is both circular (left and right ends are the same) and a power of 2.