FunctionData smoothing
Syntax C/C++#include <VFstd.h>
void VF_smooth( fVector Y, fVector X, ui size, unsigned deg);
C++ VecObj#include <OptiVec.h>
void vector<T>::smooth( const vector<T>& X, unsigned deg );
Pascal/Delphiuses VFstd;
procedure VF_smooth( Y, X:fVector; size:UIntSize; deg:UInt );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_smooth( fVector d_Y, fVector d_X, ui size, unsigned deg);
void VFcu_smooth( fVector h_Y, fVector h_X, ui size, unsigned deg);
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_smooth( d_Y, d_X:fVector; size:UIntSize; deg:UInt ): IntBool;
procedure VFcu_smooth( h_Y, h_X:fVector; size:UIntSize; deg:UInt );
DescriptionA primitive, but very fast low-frequency filtering of the vector X is performed. For each point, a weighted average of the point itself and its one or few nearest neighbours is calculated. The argument deg decides how many points are taken into accout. E.g., deg=3 means 3-point smoothing by the formula:
Yi = 0.25 * (2*Xi + Xi-1 + Xi+1)
Higher degrees (5, 7, 9...) of smoothing are achieved internally by repeated 3-point smoothing. deg = 0 or 1 means no smoothing at all; deg = 2 or 3 is interpreted as 3-point smoothing, deg = 4 or 5 as 5-point smoothing, and so on.
Error handlingnone
Return valuenone
See alsoVF_filter,   VF_biquad

VectorLib Table of Contents  OptiVec home