VCF_limit | VCD_limit | VCE_limit |
|
Function | Limit the values of the elements of a vector to a specified range. |
|
Syntax C/C++ | #include <VFmath.h>
void VF_limit( fVector Y, fVector X, ui size, float Min, float Max );
void VCF_limit( cfVector Y, cfVector X, ui size, fComplex Min, fComplex Max ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::limit( const vector<T>& X, T Min, T Max );
void vector<complex<T>>::limit( const vector<complex<T>>& X, complex<T> Min, complex<T> Max ); |
Pascal/Delphi | uses VFmath;
procedure VF_limit( Y, X:fVector; size:UIntSize; Min, Max:Single );
procedure VCF_limit( Y, X:cfVector; size:UIntSize; Min, Max:fComplex ); |
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_limit( fVector d_Y, fVector d_X, ui size, float Min, float Max );
int cusdVF_limit( fVector d_Y, fVector d_X, ui size, float *d_Min, float *d_Max );
void VFcu_limit( fVector h_Y, fVector h_X, ui size, float Min, float Max );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_limit( d_Y, d_X:fVector; size:UIntSize; Min, Max:Single ): IntBool;
function cusdVF_limit( d_Y, d_X:fVector; size:UIntSize; d_Min, d_Max:PSingle ): IntBool;
procedure VFcu_limit( h_Y, h_X:fVector; size:UIntSize; Min, Max:Single );
|
|
Description | Real version: Yi = Xi , if Min ≤ Xi ≤ Max
Yi = Max, if Xi > Max
Yi = Min, if Xi < Min
This function may be seen as a combination of VF_maxC and VF_minC.
Complex version:
Similar to the real version, but the real and imaginary parts are limited separately to the ranges specified in the respective parts of Min and Max. |
|
|
|
|