Click or drag to resize

PeakFinderBaseRetainPeaks(FuncExtrema, Extrema, Extrema, Boolean, Boolean) Method

Retains
C#
Extrema
in
C#
this
instance that satisfy the
C#
FilterDelegate
, simultaneously for each Extrema, FilterDelegate(extrema[i-1], extrema[i], extrema[i+1]). This allows the filtering of extrema based on the two immediate neighbors. End-point extrema can be dropped at will based on boolean
C#
DropEdgePeaks
.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public void RetainPeaks(
	Func<Extrema, Extrema, Extrema, bool> FilterDelegate,
	bool DropEdgePeaks
)

Parameters

FilterDelegate  FuncExtrema, Extrema, Extrema, Boolean
The filter delegate
DropEdgePeaks  Boolean
If true, the first and last peaks are also removed.

Return Value

A list of Extrema that satisified the delegate (returned true).
Remarks
Note that in the filtering process, all peaks are retained until the filtering is completed. The end-point extrema can be dropped at will since they can't be tested against the filtering delegate.
See Also