newmana/chroma-elm/10.0.1

NOTE: the latest version is 18.2.1

Chroma.Limits.CkMeans

A log linear implementation of CkMeans. It uses a divide-and-conquer algorithm to compute a row in the dynamic programming matrix in O(n lg n) time. The Simple Statistic's implementation was used to validate this implementation.

There is a better one (not implemented) using the SMAWK optimisation.

The limit function produces class breaks like the other implementations and binned puts all data values into their bins.

Definition

binned : Int -> Scale -> Nonempty (Array Float)

Return the values in Scale into the given number of bins. For example, 1 [3,3,3,4] -> 3 bins -> [[1], [3,3,3], [4]]

limit : Int -> Scale -> Nonempty Float

Create up to bins number of results using the given scale.

Helpers

converge : Int -> Int -> Int -> Float -> CkRest -> ( Float, Int )

TBD

defaultResult : Int -> Int -> CkResult

TBD

fillRestOfMatrix : Int -> Scale -> CkRest -> CkResult

TBD

firstLine : Int -> Scale -> CkRest

TBD

getMatrixIndexes : Int -> List Int

TBD

getValues : Int -> Int -> List ( Int, Int )

TBD