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
; Packed shepherd together with mincemeat for convenience | |
(import [mincemeat.shepherd [run_server]]) | |
; chunker is temporarily broken | |
;(defn chunker [gen size] | |
; (let [[gen (iter gen)] | |
; [chunk []] | |
; (try | |
; (while True | |
; (for [_ (xrange size)] |
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
%% Math %% | |
si = @(x) sin(x)./x; % cardinal sine without pi multiplied argument | |
hsin = @(x) 0.5*(1.0 - cos(x)); % haversed sine | |
hcos = @(x) 0.5*(1.0 + cos(x)); % haversed cosine | |
sigm = @(x,k) 0.5*tanh(0.5*k*x) + 0.5; % sigmoid function to (exp(-kx)+1)^-1 |