Skip to content

Find minimum processing values one by one (online algorithm)

Notifications You must be signed in to change notification settings

onlinestats/online-min

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

online-min

Find mimimum processing values one by one (online algorithm)

Usage

const Min = require('online-min')

// Direct call
const min1 = Min()
;[1,2,3,4,5].forEach(v => { min1(v) })
console.log(min1()) // -> 1

// Or via .fit() and .value getter
const min2 = Min()
;[1,2,3,4,5].forEach(v => { min2.fit(v) })
console.log(min2.value) // -> 1

// You can also pass arays to min
min2([6, 7, 8])
// Keep in mind - we already declared min2, so we just update it
// Minimum is still 1
console.log(min2.value) // -> 1! 

About

Find minimum processing values one by one (online algorithm)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published