Back to Aurora Vision Library website

You are here: Start » Function Reference » Data Classification » Statistics » FindDensityMaxima_FixedCount

FindDensityMaxima_FixedCount


Header: AVL.h
Namespace: avl
Module: FoundationPro

Finds local density maxima in set of values by looking for the highest concentration of a fixed number of samples.

Applications: Can be used to determine histogram's local maxima without actually creating the histogram.

Syntax

C++
C#
 
void avl::FindDensityMaxima_FixedCount
(
	const atl::Array<float>& inValues,
	int inCount,
	atl::Optional<float> inMaxSpread,
	bool inAllowOverlapping,
	atl::Optional<float> inCycle,
	avl::DataModeFunction::Type inModeFunction,
	atl::Optional<const avl::LocalBlindness&> inLocalBlindness,
	atl::Array<float>& outModes,
	atl::Array<float>& outSpreads
)

Parameters

Name Type Range Default Description
Input value inValues const Array<float>& Data points array
Input value inCount int 2 - 3 Number of points in a single window
Input value inMaxSpread Optional<float> NIL Maximum spread of points within a window
Input value inAllowOverlapping bool If true all local maxima will be returned otherwise for each group of ranges that overlap a single mode will be returned (the middle of the group)
Input value inCycle Optional<float> NIL Length of the cycle if data is to be considered cyclically
Input value inModeFunction DataModeFunction::Type Mean Method of calculating the center of a data mode
Input value inLocalBlindness Optional<const LocalBlindness&> NIL Helps to sieve out unnecessary points
Output value outModes Array<float>& Computed data modes
Output value outSpreads Array<float>& Spreads of windows that had a mode

Description

Find approximations of local density maxima in a data sample by looking for highest concentrations in a window with a fixed number of samples.

Overlapping windows (i.e. a series of windows with the same count and the same spread) can be returned as a single mode (the middle those windows) if inAllowOverlapping is set to false.

inMaxSpread and inLocalBlindness can be used to further filter out potentially unnecessary points in the output.

Errors

List of possible exceptions:

Error type Description
DomainError Empty array in FindDensityMaxima_FixedCount.
DomainError Unsupported mode function in FindDensityMaxima_FixedCount.

See Also

  • FindDataMode_FixedCount – Finds the mode in a set of data values by looking for highest concentration of a fixed number of samples.
  • FindDensityMaxima_FixedSpread – Finds local density maxima in a set of values by looking for the highest number of samples withing a range determined by the given spread.