Safe Haskell | None |
---|---|
Language | Haskell2010 |
- rowAdd :: Elem a b => Int -> (a, Int) -> Matrix a b -> Matrix a b
- rowsAdd :: Elem a b => [Int] -> [a] -> Matrix a b -> Matrix a b
- colAdd :: Elem a b => Int -> (a, Int) -> Matrix a b -> Matrix a b
- colsAdd :: Elem a b => [Int] -> [a] -> Matrix a b -> Matrix a b
- scaleRow :: Elem a b => Int -> a -> Matrix a b -> Matrix a b
- scaleCol :: Elem a b => Int -> a -> Matrix a b -> Matrix a b
- fromList' :: Elem a b => Int -> [a] -> Matrix a b
- hstack :: Elem a b => [Matrix a b] -> Matrix a b
- vstack :: Elem a b => [Matrix a b] -> Matrix a b
- delRow :: Elem a b => Int -> Matrix a b -> Matrix a b
- delRows :: Elem a b => [Int] -> Matrix a b -> Matrix a b
- delCol :: Elem a b => Int -> Matrix a b -> Matrix a b
- delCols :: Elem a b => [Int] -> Matrix a b -> Matrix a b
- kronecker :: Elem a b => Matrix a b -> Matrix a b -> Matrix a b
- pprint :: (PrintfArg a, Elem a b) => Matrix a b -> String
- pprintIO :: (PrintfArg a, Elem a b) => Matrix a b -> IO ()
Documentation
Basic operations on rows and columns on rows and columns on rows and columns on rows and columns
rowsAdd :: Elem a b => [Int] -> [a] -> Matrix a b -> Matrix a b Source #
Adds a list of given rows with a list weights to the first row in the list. - Note that first value in the list of weights is ignored
colsAdd :: Elem a b => [Int] -> [a] -> Matrix a b -> Matrix a b Source #
Adds a list of given columns with a list weights to the first column in the list. - Note that first value in the list of weights is ignored
Matrix creation from list
fromList' :: Elem a b => Int -> [a] -> Matrix a b Source #
Alternative implementation of fromList. It accepts a flatten list of -- elements and number of columns. -- No tests are performed to check if number of elements in list are sufficient. -
stacking functions
vstack :: Elem a b => [Matrix a b] -> Matrix a b Source #
Stack given matrices vertically. It uses the following property -- vstack [a, b, c ..] = ( hstack [a',b',c'.. ] )' where M' is transpose of -- matrix M. -- -- TODO: This is computationally inefficient than implementing is directly like -- hstack.
Function to manipulate matrices
Kronecker product of two matrix
kronecker :: Elem a b => Matrix a b -> Matrix a b -> Matrix a b Source #
Kronecker matric multiplication.
Display matrix