Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

10.21 expandEven() and expandOdd()

PrototypesHeader File(s)
template <class T>
RWMathVec<T>
expandEven(const RWMathVec<T>&)
<rw/math/mathvec.h>
RWMathVec<T>
expandOdd(const RWMathVec<T>&)
<rw/math/mathvec.h>

10.21.1 Description

Given a real sequence V(n), n=0, ..., 2N points long, it is an even sequence if:

V(n) = V(-n) = V(2N-n),

and an odd sequence if:

V(n) = - V(-n) = - V(2N-n).

Note that for a sequence to be odd, V(0) = V(N) = 0. Given the lower half of an even sequence, that is, V(n), n=0, ..., N, expandEven() expands it out to the entire sequence V(n), n=0, ..., 2N. Given the lower half of an odd sequence, that is, V(n), n=1, ..., N-1, expandOdd() expands it out to the entire sequence V(n), n=0, ..., 2N.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.