Create and act on Sparse Distributed Representations.
Cf. helins.htm.sdr.props
Create and act on Sparse Distributed Representations. Cf. `helins.htm.sdr.props`
(active-bits sdr)
Lazily computes a sorted list containing indices of active bits from this SDR.
Lazily computes a sorted list containing indices of active bits from this SDR.
(cardinality sdr)
What is the number of active bits in this SDR ?
What is the number of active bits in this SDR ?
(deserialize-immutable-SDR ba)
Deserialize an immutable SDR.
Deserialize an immutable SDR.
(immutable-SDR)
(immutable-SDR options)
Creates a new immutable SDR.
A map of options may be given :
::capacity The length of the binary vector.
Creates a new immutable SDR. A map of options may be given : ::capacity The length of the binary vector.
(immutable-SDR-from sq)
Creates a new immutable SDR from a sequence.
Creates a new immutable SDR from a sequence.
Basic functions for implementing a SDR.
Basic functions for implementing a SDR.
(active-bit? sdr i)
Is the i
iest bit active in this SDR ?
Is the `i`iest bit active in this SDR ?
(capacity sdr)
How many bits is this SDR composed of ?
How many bits is this SDR composed of ?
(clear sdr)
Turns off all bits in this SDR.
Turns off all bits in this SDR.
(serialize sdr)
Transforms this SDR into a byte array.
Transforms this SDR into a byte array.
(set-bit sdr i active?)
Sets the i
th bit in this SDR.
Sets the `i`th bit in this SDR.
(set-bit-range sdr i j active?)
Sets bits from i
to j
(both inclusive) in this SDR.
Sets bits from `i` to `j` (both inclusive) in this SDR.
(set-bits sdr i->active?)
Efficiently sets the required bits in this SDR following a map of index -> boolean.
Efficiently sets the required bits in this SDR following a map of index -> boolean.
(match-exactly? sdr-1 sdr-2)
Do those two SDRs match exactly ?
Do those two SDRs match exactly ?
(match-inexactly? overlap-score sdr-1 sdr-2)
Do those two SDRs have at least overlap-score
active bits in common ?
Do those two SDRs have at least `overlap-score` active bits in common ?
(overlap-score sdr-1 sdr-2)
Computes the number of bits active in both SDRs.
Computes the number of bits active in both SDRs.
(overlapping-bits sdr-1 sdr-2)
Lazy computes a sorted list of bits active in both SDRs.
Lazy computes a sorted list of bits active in both SDRs.
(sparsity sdr)
What is the percentage of active bits in this SDR ?
What is the percentage of active bits in this SDR ?
(union & sdrs)
Lazily computes a sequence representing the union of all the given SDRs.
Cf. [1] Section G
Lazily computes a sequence representing the union of all the given SDRs. Cf. [1] Section G
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close