| VF_flush0 | VD_flush0 | VE_flush0 |
| VCF_flush0 | VCD_flush0 | VCE_flush0 |
|
| Function | Sets vector elements with an absolute value less than a certain threshold to 0. |
|
| Syntax C/C++ | #include <VFmath.h>
void VF_flush0( fVector Y, fVector X, ui size, float AbsMin );
void VCF_flush0( fVector Y, fVector X, ui size, fComplex AbsMin ); |
| C++ VecObj | #include <OptiVec.h>
void vector<T>::flush0( const vector<T>& X, const T& AbsMin );
void vector<T>::flush0( const vector<T>& X, complex<T> AbsMin ); |
| Pascal/Delphi | uses VFmath;
procedure VF_flush0( Y, X:fVector; size:UIntSize; AbsMin:Single );
procedure VCF_flush0( Y, X:cfVector; size:UIntSize; AbsMin:fComplex ); |
|
| Description | Yi = Xi, if | Xi | >= AbsMin,
Yi = 0, otherwise
The complex versions treat the real and imaginary parts separately, using the real and imaginary parts of AbsMin to determine where to cut. If only the imaginary part is to be edited, set the real part of AbsMin to zero, e.g. (for C/C++):
VCF_flush0( Y, X, size, fcplx( 0, 1.e-6 )); |
|
|
|
|