SignalUtils.NearestMaximum Method

Overload List

#SignatureDescription
1void NearestMaximum(TVec Data, TVecInt PeakIndexes)Find the nearest peak.
2Int32 NearestMaximum(TVec Data, Int32 StartIndex)Find the nearest peak.

Overload 1: void NearestMaximum(TVec Data, TVecInt PeakIndexes)

Find the nearest peak.

#NameTypeDescription
1DataTVecsource TVec
2PeakIndexesTVecIntsource TVecInt

Result: stored in self (calling object)

Remarks:

Converge to the nearest peak of Data, if the start position is at Data[PeakIndexes[i]]. Returns the index position of the found peaks in PeakIndexes.

Overload 2: Int32 NearestMaximum(TVec Data, Int32 StartIndex)

Find the nearest peak.

#NameTypeDescription
1DataTVecsource TVec
2StartIndexInt32

Returns: Int32

Remarks:

Converge to the nearest maximum in Data, if the start position is at Data[StartIndex]. Returns the position of the found maximum: Data[i-1] < Data[i] > Data[i+1].