(distribute vect f avg-actions & {:keys [debug] :as options})Perform f an avg-actions number of times randomly across the elements of the vector.
The avg-actions may be a float, but if avg-actions is zero, nothing will be done.
The total number of actions to perform will be plucked from a safe-sample-normal curve based on a mean of vect count times avg-actions. You can customize this with an options hash supplying standard-deviation, upper and lower bounds.
Returns the updated vector.
Perform f an avg-actions number of times randomly across the elements of the vector. The avg-actions may be a float, but if avg-actions is zero, nothing will be done. The total number of actions to perform will be plucked from a safe-sample-normal curve based on a mean of vect count times avg-actions. You can customize this with an options hash supplying standard-deviation, upper and lower bounds. Returns the updated vector.
(random-node-name)Generate a random node name.
Generate a random node name.
(random-parameters)Generate a random set of parameters.
Generate a random set of parameters.
(random-pp-path)Generate a random path to a modules pp file
Generate a random path to a modules pp file
(random-pronouncable-word)(random-pronouncable-word length)(random-pronouncable-word length sd)(random-pronouncable-word length sd {:keys [lowerb upperb] :or {lowerb 1}})Generate a random string of optional length that alternates consonants and vowels to produce a loosely recognizable wordish thing.
Optionally, supply standard deviation, to return a word of variable length from the given size based on the safe-sample-normal function.
Generate a random string of optional length that alternates consonants and vowels to produce a loosely recognizable wordish thing. Optionally, supply standard deviation, to return a word of variable length from the given size based on the safe-sample-normal function.
(random-resource)(random-resource type title)(random-resource type title overrides)Generate a random resource. Can optionally specify type/title, as well as any attribute overrides.
Note that is parameters is given as an override, the supplied parameters are merged in with the randomly generated set.
Generate a random resource. Can optionally specify type/title, as well as any attribute overrides. Note that is _parameters_ is given as an override, the supplied parameters are merged in with the randomly generated set.
(random-resource-event)Generate a random resource event.
Generate a random resource event.
(random-sentence-ish)(random-sentence-ish word-count)(random-sentence-ish word-count sd)(random-sentence-ish word-count sd {:keys [lowerb upperb] :or {lowerb 1}})Gibberish sentence of about x 'words'.
Gibberish sentence of about x 'words'.
(random-sha1)(random-sha1 str-size)Generate a SHA1 hash of a random-string.
Generate a SHA1 hash of a random-string.
(random-string)(random-string length)Generate a random string of optional length
Generate a random string of optional length
(random-string-alpha)(random-string-alpha length)Generate a random string of optional length, only lower case alphabet chars
Generate a random string of optional length, only lower case alphabet chars
(random-type-name)Generate a random type name.
Generate a random type name.
(safe-sample-normal mean
standard-deviation
&
{:keys [lowerb upperb] :or {lowerb 0 upperb (* 2 mean)}})Get a random integer from the normal distribution guarded by some sane lower and upper bound. If not given, they default to 0 and twice the mean.
Get a random integer from the normal distribution guarded by some sane lower and upper bound. If not given, they default to 0 and twice the mean.
(sample-normal mean standard-deviation)Get a random integer from a normal distribution described by the given mean and standard deviation from that mean.
~68% of the returned values will fall within mean +/- standard-deviation. ~95% within two standard-deviations. ~99% within three... https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule
Get a random integer from a normal distribution described by the given mean and standard deviation from that mean. ~68% of the returned values will fall within mean +/- standard-deviation. ~95% within two standard-deviations. ~99% within three... https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |