Liking cljdoc? Tell your friends :D

tupelo.data.index


->indexclj

(->index some-set)

Inputs: [some-set :- (s/cond-pre tsk/Set tsk/Vec)] Returns: SortedSetType

Converts a sequence (vec or set) into a lexically-sorted index

Inputs: [some-set :- (s/cond-pre tsk/Set tsk/Vec)]
Returns: SortedSetType

Converts a sequence (vec or set) into a lexically-sorted index
sourceraw docstring

add-entryclj

(add-entry index entry)

Inputs: [index :- SortedSetType entry :- tsk/Vec]

Add an entry to the index, returning the modified index

Inputs: [index :- SortedSetType entry :- tsk/Vec]

Add an entry to the index, returning the modified index
sourceraw docstring

bound-lowerclj

(bound-lower val)

Inputs: [val :- tsk/Vec] Returns: tsk/Vec

Given a lexical value as a vector such as [1 :a], returns a lower bound like [1]

Inputs: [val :- tsk/Vec]
Returns: tsk/Vec

Given a lexical value as a vector such as [1 :a], returns a lower bound like [1]
sourceraw docstring

empty-indexclj

(empty-index)

Inputs: []

Returns an empty lexically-sorted index

Inputs: []

Returns an empty lexically-sorted index
sourceraw docstring

IndexEntryTypeclj

source

IndexTypeclj

source

LexicalValTypeclj

source

prefix-match?clj

(prefix-match? pattern sample)

Inputs: [pattern :- LexicalValType sample :- LexicalValType] Returns: s/Bool

Returns true if the sample value equals the pattern when truncated to the same length

Inputs: [pattern :- LexicalValType sample :- LexicalValType]
Returns: s/Bool

Returns true if the sample value equals the pattern when truncated to the same length
sourceraw docstring

prefix-matchesclj

(prefix-matches match-val lex-set)

Inputs: [match-val :- LexicalValType lex-set :- SortedSetType] Returns: SortedSetType

Return the :matches values found via split-key-prefix.

Inputs: [match-val :- LexicalValType lex-set :- SortedSetType]
Returns: SortedSetType

Return the `:matches` values found via `split-key-prefix`.
sourceraw docstring

remove-entryclj

(remove-entry index entry)

Inputs: [index :- SortedSetType entry :- tsk/Vec]

Remove an entry to the index, returning the modified index. Throws if entry not found in index.

Inputs: [index :- SortedSetType entry :- tsk/Vec]

Remove an entry to the index, returning the modified index. Throws if entry not found in index.
sourceraw docstring

SortedMapTypeclj

source

SortedSetTypeclj

source

split-key-prefixclj

(split-key-prefix match-val lex-set)

Inputs: [match-val :- LexicalValType lex-set :- SortedSetType] Returns: #:s{Keyword SortedSetType}

Like clojure.data.avl/split-key, but allows prefix matches. Given a lexically sorted set like: #{[:a 1] [:a 2] [:a 3] [:b 1] [:b 2] [:b 3] [:c 1] [:c 2]} splits data by prefix match for patterns like [:b], returning a map of 3 sorted sets like: {:smaller #{[:a 1] [:a 2] [:a 3]} :matches #{[:b 1] [:b 2] [:b 3]} :larger #{[:c 1] [:c 2]} ]

Inputs: [match-val :- LexicalValType lex-set :- SortedSetType]
Returns: #:s{Keyword SortedSetType}

Like clojure.data.avl/split-key, but allows prefix matches. Given a lexically sorted set like:
  #{[:a 1]
    [:a 2]
    [:a 3]
    [:b 1]
    [:b 2]
    [:b 3]
    [:c 1]
    [:c 2]}
 splits data by prefix match for patterns like [:b], returning a map of 3 sorted sets like:
{:smaller #{[:a 1]
            [:a 2]
            [:a 3]}
 :matches #{[:b 1]
            [:b 2]
            [:b 3]}
 :larger  #{[:c 1]
            [:c 2]} ]
    
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close