time-series-0.1.0.0: Time series analysis.

Portabilityportable
Stabilityexperimental
Safe HaskellSafe-Inferred

TimeSeries.PRG64

Description

Computing pseudorandom 64-bit words. We use RC5 as a basis for our PRG.

Synopsis

Documentation

rndSource

Arguments

:: Word64

bw, size of unit vector.

-> Word64

nb, size of control vector.

-> Integer

Seed.

-> ([Double], [Double])

(unit vector, control vector).

Random unit vector and control vector, with specified size.

Same random sequence will returned with same seed, so that sketch distance could be calculated with same random sequence.

data PRG64 Source

Constructors

PRG64 

Fields

prg64A :: !Word64
 
prg64B :: !Word64
 

Instances

prg64Keys :: [(Word64, Word64)]Source

Key pairs for rounds a-la RC5. We have to have at lest 6 rounds for avalanche effect.

prg64Next :: PRG64 -> (PRG64, Word64)Source

Compute the next value.

prg64Bits :: Num a => PRG64 -> [[a]]Source