A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clojure.github.io/data.generators/ below:

clojure.data.generators - data.generators 1.1.0-SNAPSHOT API documentation

API for clojure.data.generators -

Full namespace name:

clojure.data.generators Overview
Data generators for Clojure.

Public Variables and Functions
*rnd*dynamic var

Random instance for use in generators. By consistently using this
instance you can get a repeatable basis for tests.
Source

anythingfunction
Usage: (anything)
Returns a scalar or collection based on *rnd*.
Source

booleanfunction
Usage: (boolean)
Returns a bool based on *rnd*.
Source

boolean-arrayfunction
Usage: (boolean-array f)
       (boolean-array f sizer)
Create an array with elements from f and sized from sizer.
Source

bytefunction
Usage: (byte)
Returns a long based on *rnd* in the byte range.
Source

byte-arrayfunction
Usage: (byte-array f)
       (byte-array f sizer)
Create an array with elements from f and sized from sizer.
Source

charfunction
Usage: (char)
Returns a character based on *rnd* in the range 0-65536.
Source

char-arrayfunction
Usage: (char-array f)
       (char-array f sizer)
Create an array with elements from f and sized from sizer.
Source

collectionfunction
Usage: (collection)
Returns a collection of scalar elements based on *rnd*.
Source

datefunction
Usage: (date)
       (date base)
Create a date with geometric mean around base which defaults to
#inst "2007-10-16T00:00:00.000-00:00"
Source

default-sizerfunction
Usage: (default-sizer)
Default sizer used to run tests. If you want a specific distribution,
create your own and pass it to a fn that wants a sizer.
Source

doublefunction
Usage: (double)
Generate a double between 0 and 1 based on *rnd*.
Source

double-arrayfunction
Usage: (double-array f)
       (double-array f sizer)
Create an array with elements from f and sized from sizer.
Source

floatfunction
Usage: (float)
Generate a float between 0 and 1 based on *rnd*
Source

float-arrayfunction
Usage: (float-array f)
       (float-array f sizer)
Create an array with elements from f and sized from sizer.
Source

geometricfunction
Usage: (geometric p)
Geometric distribution with mean 1/p.
Source

hash-mapfunction
Usage: (hash-map fk fv)
       (hash-map fk fv sizer)
Create a hash-map with keys from fk, vals from fv, and
sized from sizer.
Source

intfunction
Usage: (int)
Returns a int based on *rnd* in the int range.
Source

int-arrayfunction
Usage: (int-array f)
       (int-array f sizer)
Create an array with elements from f and sized from sizer.
Source

keywordfunction
Usage: (keyword)
       (keyword sizer)
Create a non-namespaced keyword sized from sizer.
Source

listfunction
Usage: (list f)
       (list f sizer)
Create a list with elements from f and sized from sizer.
Source

longvar

Returns a long based on *rnd*. Same as uniform.
Source

long-arrayfunction
Usage: (long-array f)
       (long-array f sizer)
Create an array with elements from f and sized from sizer.
Source

one-offunction
Usage: (one-of & specs)
Generates one of the specs passed in, with equal probability.
Source

printable-ascii-charfunction
Usage: (printable-ascii-char)
Returns a char based on *rnd* in the printable ascii range.
Source

rand-nthfunction
Usage: (rand-nth coll)
Replacement of core/rand-nth that allows control of the
randomization basis (through binding *rnd*).
Source

ratiofunction
Usage: (ratio)
       (ratio num-gen denom-gen)
Generate a ratio, with numerator and denominator uniform longs
or as specified
Source

repsfunction
Usage: (reps sizer f)
Returns sizer repetitions of f (or (f) if f is a fn).
Source

reservoir-samplefunction
Usage: (reservoir-sample ct coll)
Reservoir sample ct items from coll, using *rnd*.
Source

scalarfunction
Usage: (scalar)
Returns a scalar based on *rnd*.
Source

setfunction
Usage: (set f)
       (set f sizer)
Create a set with elements from f and sized from sizer.
Source

shortfunction
Usage: (short)
Returns a short based on *rnd* in the short range.
Source

short-arrayfunction
Usage: (short-array f)
       (short-array f sizer)
Create an array with elements from f and sized from sizer.
Source

shufflefunction
Usage: (shuffle coll)
Shuffle coll based on *rnd*
Source

stringfunction
Usage: (string)
       (string f)
       (string f sizer)
Create a string with chars from f and sized from sizer.
Source

symbolfunction
Usage: (symbol)
       (symbol sizer)
Create a non-namespaced symbol sized from sizer.
Source

tuplefunction
Usage: (tuple & generators)
Generate a tuple with one element from each generator.
Source

uniformfunction
Usage: (uniform)
       (uniform lo hi)
Uniform distribution from lo (inclusive) to hi (exclusive).
Defaults to range of Java long.
Source

uuidfunction
Usage: (uuid)
Create a UUID based on uniform distribution of low and high parts.
Source

vecfunction
Usage: (vec f)
       (vec f sizer)
Create a vec with elements from f and sized from sizer.
Source

weightedfunction
Usage: (weighted m)
Given a map of generators and weights, return a value from one of
the generators, selecting generator based on weights.
Source


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4