Project Group_V1
Omar Pakker Chiel Peters Mary Gouseti Cindy Berghuizen
Nice short concise report.
*Lab6> lengthCar 500 10
"500"
*Lab6>lengthMR 500 10
"0"
Sometimes too concise:
The numbers that give True for the first argument in the tuple are indeed known Mersenne numbers as can
be found on http://en.wikipedia.org/wiki/Mersenne_prime.
I assume that you have not tested all the 48 known Mersenne primes.
-- functions to show the difference in result of Fermat's primality and Miller-Rabin's
primality check
lengthCar :: Integer -> Int -> IO String
lengthCar n k= do
f <- testMore1 n k
return $ show (length f)
lengthMR :: Integer -> Int -> IO String
lengthMR n k = do
f <- test2More n k
return $ show (length f)
The names of the tests are not always clear. Rename for example
lengthCar into lengthF.
Opg4
trClos :: ( Ord a) => Rel a -> Rel a
trClos x = trClos2 x []
-- If the closure n+1 is a subset of n than all closures are found
-- because no new elements were found
trClos2 :: ( Ord a) => Rel a -> Rel a -> Rel a
trClos2 = fix (\ f x y ->
if subSet ( list2set x) ( list2set y) then ( nub x)
else f ((x @@ x )++ x) x)
Proposal to change this in
trClos :: ( Ord a) => Rel a -> Rel a
trClos x = trClos2$nub x []
-- If the closure n+1 is a subset of n than all closures are found
-- because no new elements were found
trClos2 :: ( Ord a) => Rel a -> Rel a -> Rel a
trClos2 = fix (\ f x y ->
if ( length x == length y) then x
else f$nub ((x @@ x )++ x) x)
which is more optimal.
Opg5
testTrClos :: ( Ord a) => Rel a -> Rel a -> Bool
testTrClos [] _ = True
testTrClos (x:xs) z = (all (\y -> elem y z) ([x] @@ z)) && ( testTrClos xs z)
Why has testTrClos two arguments and why using (tail) recursion? This candidate for improving.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.