(derandomize ctx prng-val)
Inputs: [ctx :- tsk/KeyMap prng-val :- s/Int] Returns: BigInteger
Given a PRNG context, reverts an N-bit 'randomized' integer to the original N-bit index.
Inputs: [ctx :- tsk/KeyMap prng-val :- s/Int] Returns: BigInteger Given a PRNG context, reverts an N-bit 'randomized' integer to the original N-bit index.
(gen-slope nbits random-gen)
Inputs: [nbits :- s/Int random-gen :- Random] Returns: BigInteger
Generate a positive, odd slope value
Inputs: [nbits :- s/Int random-gen :- Random] Returns: BigInteger Generate a positive, odd slope value
(new-ctx opts)
Inputs: [opts :- tsk/KeyMap] Returns: tsk/KeyMap
Creates a new PRNG context map. Usage:
(new-ctx <params-map>)
where <params-map> is of the form:
{:num-bits <long> ; REQUIRED: (minimum: 4): input/output integers in [0..2^n)
:rand-seed <long> ; optional: PRNG seed (default: randomized)
:num-rounds <long> ; optional: positive int (default: 3)
}
Inputs: [opts :- tsk/KeyMap] Returns: tsk/KeyMap Creates a new PRNG context map. Usage: (new-ctx <params-map>) where <params-map> is of the form: {:num-bits <long> ; REQUIRED: (minimum: 4): input/output integers in [0..2^n) :rand-seed <long> ; optional: PRNG seed (default: randomized) :num-rounds <long> ; optional: positive int (default: 3) }
(randomize ctx idx)
Inputs: [ctx :- tsk/KeyMap idx :- s/Int] Returns: BigInteger
Given a PRNG context, converts an N-bit index to a unique N-bit 'randomized' value.
Inputs: [ctx :- tsk/KeyMap idx :- s/Int] Returns: BigInteger Given a PRNG context, converts an N-bit index to a unique N-bit 'randomized' value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close