Updated with rigor, per Haskell community feedback.
This commit is contained in:
parent
48b20c54ce
commit
0f9f50c732
13 changed files with 120 additions and 223 deletions
|
@ -1,14 +1,13 @@
|
|||
module Main where
|
||||
|
||||
import System.Random
|
||||
import Kairos
|
||||
import qualified Types
|
||||
import qualified Kairos
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
g <- newStdGen
|
||||
let i = take 10 $ randoms g
|
||||
i' = coherence i 0.1
|
||||
sumAbs = sum $ map abs i'
|
||||
let intellectons = replicate 10 (Types.Intellecton 1.0 1.0)
|
||||
intellectons' = Kairos.coherence intellectons 0.1
|
||||
sumAbs = sum $ map (abs . Types.value) intellectons'
|
||||
if sumAbs > 0
|
||||
then putStrLn "Kairos test passed: Coherence updated"
|
||||
else putStrLn "Kairos test failed" >> error "Test failed"
|
Loading…
Add table
Add a link
Reference in a new issue