This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defrecord LSH [X b w] | |
clojure.lang.IFn | |
(invoke [this v] | |
(a/floor (a/div (a/add b (a/inner-product X v)) | |
w))) | |
(applyTo [this args] (clojure.lang.AFn/applyToHelper this args))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SEXPParser | |
# patterns for identifiers, and both kinds of numbers | |
#const ident = r"[[:punct:][:alpha:]][[:alnum:]]*" | |
const integer = r"^-*\d+$" | |
const floating = r"^-*\d*\.\d+$" | |
# converts numbers to their proper forms, and could | |
# be extended |
NewerOlder