IneqSolvTester.hs revision 959d7040e951c96a5ca372a8df69f7dc92bc0309
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maedermodule Main where
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian MaederprintResult :: [Int] -> [Int] -> Int -> IO ()
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian MaederprintResult n p lim =
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder let res = ineqSolver (Coeffs n p) lim
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder in putStr ("Solutions: " ++ show res ++ "\n")
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maederst :: ([Int], [Int], Int) -> [Int]
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maederst = \(x,_,_)->x
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maedernd :: ([Int], [Int], Int) -> [Int]
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maedernd = \(_,x,_)->x
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maederrd :: ([Int], [Int], Int) -> Int
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maederrd = \(_,_,x)->x
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder{- to be used as a stub
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder line <- getLine
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder let i = ([],[],0)
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder putStr ("Coefficients: " ++ show (st i) ++ " " ++ show (nd i) ++ " "
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder ++ "Limit: " ++ show (rd i) ++ "\n")
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder printResult (st i) (nd i) (rd i)
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder let i1 = ([13],[1],20)
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder putStr ("Coefficients: " ++ show (st i1) ++ " " ++ show (nd i1) ++ " "
7439eb4a3269fa24aebfe522eb5be6f212e618e2Christian Maeder ++ "Limit: " ++ show (rd i1) ++ "\n")