lapack-0.3.2: Numerical Linear Algebra using LAPACK
Safe HaskellNone
LanguageHaskell98

Numeric.LAPACK.Example.EconomicAllocation

Description

Do not import this module. It is only for demonstration purposes.

Synopsis

Documentation

>>> import Numeric.LAPACK.Example.EconomicAllocation
>>> import Test.Utility (approxVector)
>>> 
>>> import qualified Numeric.LAPACK.Vector as Vector
>>> import Numeric.LAPACK.Vector ((+++))
>>> 
>>> import qualified Data.Array.Comfort.Storable as Array

type Vector sh = Vector sh Double Source #

type Matrix height width = General height width Double Source #

type SquareMatrix size = Square size Double Source #

normalize :: (Eq height, C height, C width) => Matrix height width -> Matrix height width Source #

normalizeSplit :: (C sh0, C sh1, Eq sh1) => Matrix sh1 (sh0 :+: sh1) -> (Matrix sh0 sh1, SquareMatrix sh1) Source #

completeIdSquare :: (C sh0, Eq sh0, C sh1, Eq sh1) => Matrix sh1 (sh0 :+: sh1) -> SquareMatrix (sh0 :+: sh1) Source #

iterated :: (C sh0, Eq sh0, C sh1, Eq sh1) => Matrix sh1 (sh0 :+: sh1) -> Vector (sh0 :+: sh1) -> Vector (sh0 :+: sh1) Source #

compensated :: (C sh0, Eq sh0, C sh1, Eq sh1) => Matrix sh1 (sh0 :+: sh1) -> Vector (sh0 :+: sh1) -> Vector sh0 Source #

main :: IO () Source #

let result = iterated expenses0 balances0 in approxVector result $ compensated expenses0 balances0 +++ Vector.zero (Array.shape $ Vector.takeRight result)