Prototypes | Header File(s) | |
template <class T> | ||
RWMathVec<T> |
delta(const RWMathVec<T>&) |
<rw/math/mathvec.h> |
Takes a vector x as an argument and returns a vector y of element differences. The first element in y is set equal to the first element of x. An element y(i) where i is not 0 is set equal to x(i)-x(i-1).
For example, if x = [2, 4, 5, 8] then y = [2, 2, 1, 3].