VF_localmaxima | VD_localmaxima | VE_localmaxima |
|
Function | Find the indices of local maxima |
|
Syntax C/C++ | #include <VFstd.h>
ui VF_localmaxima( uiVector Ind, fVector X, ui size ); |
C++ VecObj | #include <OptiVec.h>
ui vector<ui>::localmaxima( const vector<T>& X ); |
Pascal/Delphi | uses VFstd;
function VF_localmaxima( Ind:uiVector; X:fVector; size:UIntSize ):UIntSize; |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_localmaxima( ui *h_nFound, uiVector d_Ind, fVector d_X, ui size );
ui VFcu_localmaxima( uiVector h_Ind, fVector h_X, ui size );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_localmaxima( var h_nFound:UIntSize; d_Ind:uiVector; d_X:fVector; size:UIntSize ): IntBool;
function VFcu_localmaxima( h_Ind:uiVector; h_X:fVector; size:UIntSize ): UIntSize;
|
|
Description | The indices of local maxima in X are stored in Ind and the number of local maxima is returned (this is the number of elements of Ind). A local maximum is defined as one element of X that is greater than both its neighbours to the right and to the left. That means that the zero'th and the last element of X (which have only one neighbour) cannot be local maxima. Also, if two adjacent elements are equal, none of them can be a local maximum. |
|
|
Return value | number of local maxima found |
|
|