measurable

A simple shallowly-embedded DSL for dealing with measures.
Log | Files | Refs | README | LICENSE

commit 25747f9a09c03cfd4c3c6d53b4abaa11ce72b258
parent bf9df624d63f741d7b4bec222969a6e9ac8dbb21
Author: Jared Tobin <jared@jtobin.ca>
Date:   Sat, 19 Oct 2013 18:15:19 +1300

Replace mult with addition in basic example.

Diffstat:
Mtests/Test.hs | 13++-----------
1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/tests/Test.hs b/tests/Test.hs @@ -1,13 +1,4 @@ --- Simple example that demonstrates some measure-foo. --- --- Create a measure from a standard normal pdf, and another from a collection of --- samples drawn from an exponential distribution. --- --- Push trigonometric functions on each and convolute the results. --- --- Push an exponential function on that, and calculate the mean of the resulting --- distribution. --- +-- Simple examples that demonstrate some measure-foo. import Control.Monad import Measurable @@ -29,7 +20,7 @@ main = do let mu = fromDensity standardNormal nu = fromObservations expSamples - rho = (push cos mu) * (push sin nu) + rho = (push cos mu) + (push sin nu) eta = push exp rho putStrLn $ "mean of normal samples (should be around 0): " ++