htm-community / comportex

Hierarchical Temporal Memory in Clojure
153 stars 27 forks source link

Do bit-shifting in parents, not children. #4

Closed mrcslws closed 10 years ago

mrcslws commented 10 years ago

Remove awareness of siblings from regions / encoders. Rather than returning a set of final indices, return a lazy seq of unshifted indices, allowing the caller to shift as needed.

mrcslws commented 10 years ago

Verified:

I see that the encoders specifically handle nil, returning an empty set. So I continued this, returning an empty sequence. I haven't investigated whether this is necessary (i.e. whether we could just use (when ...) and return nil otherwise).

mrcslws commented 10 years ago

My .emacs is set to remove trailing whitespace on save, hence the whitespace-only changes. Let me know if I should avoid that (e.g. if our editor configs will get into a fight)

floybix commented 10 years ago

Good work! It's clear you grok the code.