haskell-eigen-util-0.1.0.0: Some utility functions for haskell-eigen library

Safe HaskellNone
LanguageHaskell2010

Data.Eigen.Util

Synopsis

Documentation

rowAdd :: Elem a b => (a, Int) -> (a, Int) -> Matrix a b -> Matrix a b Source #

rowAdd row r1 = k1 * row r1 + k2 * row r2

colAdd :: Elem a b => (a, Int) -> (a, Int) -> Matrix a b -> Matrix a b Source #

colAdd col c1 = k1 * col c1 + k2 * col c2

scaleRow :: Elem a b => Int -> a -> Matrix a b -> Matrix a b Source #

scale a row by a factor

scaleCol :: Elem a b => Int -> a -> Matrix a b -> Matrix a b Source #

scale a column by a factor

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.

hstack :: Elem a b => [Matrix a b] -> Matrix a b Source #

Stack matrices horizontallly

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.

delRow :: Elem a b => Int -> Matrix a b -> Matrix a b Source #

delete a row

delRows :: Elem a b => [Int] -> Matrix a b -> Matrix a b Source #

delete list of given rows

delCol :: Elem a b => Int -> Matrix a b -> Matrix a b Source #

delete a column

delCols :: Elem a b => [Int] -> Matrix a b -> Matrix a b Source #

delete list of given columns

kronecker :: Elem a b => Matrix a b -> Matrix a b -> Matrix a b Source #

Kronecker matric multiplication.