FindDensityMaxima_FixedCount
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#
Python
def FindDensityMaxima_FixedCount( inValues: list[float], /, *, inCount: int = 3, inMaxSpread: float | None = None, inAllowOverlapping: bool = False, inCycle: float | None = None, inModeFunction: DataModeFunction = DataModeFunction.Mean, inLocalBlindness: LocalBlindness | None = None ) -> ( outModes: list[float], outSpreads: list[float] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inValues | list[float] | Data points array | ||
![]() |
inCount | int | 2 - ![]() |
3 | Number of points in a single window |
![]() |
inMaxSpread | float | None | None | Maximum spread of points within a window | |
![]() |
inAllowOverlapping | bool | False | 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) | |
![]() |
inCycle | float | None | None | Length of the cycle if data is to be considered cyclically | |
![]() |
inModeFunction | DataModeFunction | DataModeFunction.Mean | Method of calculating the center of a data mode | |
![]() |
inLocalBlindness | LocalBlindness | None | None | Helps to sieve out unnecessary points | |
![]() |
outModes | list[float] | Computed data modes | ||
![]() |
outSpreads | list[float] | Spreads of windows that had a mode |



