Skip to content

A Julia package for getting a minimum or maximum value quickly in vector.

License

Notifications You must be signed in to change notification settings

Chemical118/RMMQ.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RMMQ.jl

RMMQ provides fast way to get a minimum, maximum value by using Range minimum query.

CI Codecov Docs Latest

Install

using Pkg
Pkg.add(url="https://github.com/Chemical118/RMMQ.jl")

Example

using RMMQ, Printf

n = 1000
x = rand(n)

Smin = MinSolver(x)
Smax = MaxSolver(x)
Sext = ExtreSolver(x)

i, j = 10, 1000

@printf "%f %f\n" extrema(Sext[i:j])...
println(minimum(Smin[i:j]))
println(maximum(Smax[i:j]))

About

A Julia package for getting a minimum or maximum value quickly in vector.

Topics

Resources

License

Stars

Watchers

Forks

Languages