Catalog generation and manipulation
A suite of functions that aid in constructing random catalogs, or randomly modifying an existing catalog (wire format or parsed).
Catalog generation and manipulation A suite of functions that aid in constructing random catalogs, or randomly modifying an existing catalog (wire format or parsed).
(add-random-edge-to-catalog {:keys [edges resources] :as c})Creates a new edge between 2 randomly chosen resources, and adds it to the catalog
Creates a new edge between 2 randomly chosen resources, and adds it to the catalog
Adds a random resource to the given wire-format catalog
Adds a random resource to the given wire-format catalog
(add-random-resource-to-catalog {:keys [resources] :as c})Adds a random resource to the given catalog
Adds a random resource to the given catalog
Adds a random resource to the given wire-format catalog
Adds a random resource to the given wire-format catalog
(convert-internal-catalog-fn f)Takes a function that transforms a catalog in the internal format
and returns a function that converts from wire to internal, applies f, then
converts the catalog back to a the wire format
Takes a function that transforms a catalog in the internal format and returns a function that converts from wire to internal, applies `f`, then converts the catalog back to a the wire format
(convert-to-wire catalog)Converts a catalog in the internal format to the wire format
Converts a catalog in the internal format to the wire format
(mod-resource-in-catalog {:keys [resources] :as c})Modifies a randomly chosen resource in the given catalog.
Takes the candidate resources, and gives it a new, randomly generated set of parameters
Modifies a randomly chosen resource in the given catalog. Takes the candidate resources, and gives it a new, randomly generated set of parameters
Modifies a randomly chosen resource in the given wire-format catalog.
Modifies a randomly chosen resource in the given wire-format catalog.
(mod-resource-metadata-in-catalog {:keys [resources] :as c})Modifies the metadata of a randomly chosen resource in the given catalog.
Generates a random resource and applies the old parameters to it.
Modifies the metadata of a randomly chosen resource in the given catalog. Generates a random resource and applies the old parameters to it.
(rand-relationship)(rand-relationship prev-relationship)Picks a edge relationship at random from relationships. If a
prev-relationship is provided, it ensures it doesn't randomly
pick that relationship.
Picks a edge relationship at random from `relationships`. If a `prev-relationship` is provided, it ensures it doesn't randomly pick that relationship.
Set of all possible edge relationships
Set of all possible edge relationships
(swap-edge-targets-in-catalog {:keys [edges] :as c})Picks 2 random edges in the given catalog, and swaps their targets around
Picks 2 random edges in the given catalog, and swaps their targets around
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 |