-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Some utility functions for haskell-eigen library -- -- Please see README.md @package haskell-eigen-util @version 0.1.0.1 module Data.Eigen.Util -- | rowAdd r1 = r1 + k * r2 rowAdd :: Elem a b => Int -> (a, Int) -> Matrix a b -> Matrix a b -- | 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 rowsAdd :: Elem a b => [Int] -> [a] -> Matrix a b -> Matrix a b -- | colAdd c1 = c1 + k * c2 colAdd :: Elem a b => Int -> (a, Int) -> Matrix a b -> Matrix a b -- | 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 colsAdd :: Elem a b => [Int] -> [a] -> Matrix a b -> Matrix a b -- | scale a row by a factor scaleRow :: Elem a b => Int -> a -> Matrix a b -> Matrix a b -- | scale a column by a factor scaleCol :: Elem a b => Int -> a -> Matrix a b -> Matrix a b -- | 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. - fromList' :: Elem a b => Int -> [a] -> Matrix a b -- | Stack matrices horizontallly hstack :: Elem a b => [Matrix a b] -> Matrix a b -- | 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. vstack :: Elem a b => [Matrix a b] -> Matrix a b -- | delete a row delRow :: Elem a b => Int -> Matrix a b -> Matrix a b -- | delete list of given rows delRows :: Elem a b => [Int] -> Matrix a b -> Matrix a b -- | delete a column delCol :: Elem a b => Int -> Matrix a b -> Matrix a b -- | delete list of given columns delCols :: Elem a b => [Int] -> Matrix a b -> Matrix a b -- | Kronecker matric multiplication. kronecker :: Elem a b => Matrix a b -> Matrix a b -> Matrix a b