Portability | portable |
---|---|
Stability | provisional |
Maintainer | echbar137@yahoo.co.in |
Safe Haskell | Safe |
Common utility functions, simple linear algebra.
- squareRoot :: Int -> Maybe Int
- (|*|) :: Matrix -> Vec -> Vec
- (|**|) :: Matrix -> Matrix -> Matrix
- multMatrix :: Numb -> Matrix -> Matrix
- cofactors :: Matrix -> Matrix
- transposeM :: Matrix -> Matrix
- inverse :: Matrix -> Matrix
- showM :: Matrix -> String
- doM :: Monad m => (a -> Bool) -> (a -> m a) -> a -> m a
- (~>) :: Monad m => m a -> (a -> b -> m b) -> b -> m b
- (~|) :: Monad m => (a -> m b) -> a -> m a
- (<*) :: Monad m => m a -> m b -> m a
- concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
- listToMaybe :: [a] -> Maybe a
- maybeRead :: String -> Maybe Int
- spanFaces :: (Enum a, Num a, Ord b) => (Side -> Side -> b) -> [(a, b)]
- sides :: [Side]
- vecs :: [Vec]
- multVec :: Numb -> Vec -> Vec
- mapVec :: (Vec -> Vec -> a) -> [Vec] -> a
- det :: Matrix -> Int
- vecDet :: Vec -> Vec -> Vec -> Int
- matrixMult :: Matrix -> Int -> Matrix
- cross :: Vec -> Vec -> Vec
- minus :: Vec -> Vec
- vcomp :: Vec -> Int
- vpos :: Vec -> Int
- dot :: Vec -> Vec -> Numb
- gateMinus :: Numb -> Vec -> Vec
- modMinus :: Numb -> Numb -> Vec -> Vec
- modNot :: Numb -> Numb -> Numb
Documentation
squareRoot :: Int -> Maybe IntSource
Returns square root of argument if argument is a perfect square.
multMatrix :: Numb -> Matrix -> MatrixSource
Multiple a matrix by a scalar.
transposeM :: Matrix -> MatrixSource
Transpose of a matrix.
concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]Source
listToMaybe :: [a] -> Maybe aSource
spanFaces :: (Enum a, Num a, Ord b) => (Side -> Side -> b) -> [(a, b)]Source
Applies a function on the domain of Side x Side.
mapVec :: (Vec -> Vec -> a) -> [Vec] -> aSource
Convert a function with two vector arguments to one accepting a list of vectors.
vecDet :: Vec -> Vec -> Vec -> IntSource
Calculate the determinate of a matrix constructed by three column vectors.
matrixMult :: Matrix -> Int -> MatrixSource
Multiple a matrix by a scalar.