Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Dec 12, 2021
1 parent f1c1a51 commit 6f287da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stats/cold.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ const COLD_MAX_PERCENTAGE = 0.6
// - Therefore, outliers are still present and must be removed using a `filter`
// - This also requires using two indexes: filtered and not.
// `minIndex` is always <= `maxIndex`, i.e. a `closestMean` is always found.
// Time complexity is `O(n)`.
// Memory complexity is `O(1)` and very low by using a streaming logic.
/* eslint-disable max-statements, complexity, fp/no-let, fp/no-loops,
fp/no-mutation, max-depth, no-continue */
const getClosestMean = function (array, { mean, minIndex, maxIndex, filter }) {
Expand Down

0 comments on commit 6f287da

Please sign in to comment.