Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- type Hermitian sh = ArrayMatrix (Hermitian sh)
- data Transposition
- size :: Hermitian sh a -> sh
- fromList :: (C sh, Storable a) => Order -> sh -> [a] -> Hermitian sh a
- autoFromList :: Storable a => Order -> [a] -> Hermitian ShapeInt a
- identity :: (C sh, Floating a) => Order -> sh -> Hermitian sh a
- diagonal :: (C sh, Floating a) => Order -> Vector sh (RealOf a) -> Hermitian sh a
- takeDiagonal :: (C sh, Floating a) => Hermitian sh a -> Vector sh (RealOf a)
- forceOrder :: (C sh, Floating a) => Order -> Hermitian sh a -> Hermitian sh a
- stack :: (C sh0, Eq sh0, C sh1, Eq sh1, Floating a) => Hermitian sh0 a -> General sh0 sh1 a -> Hermitian sh1 a -> Hermitian (sh0 :+: sh1) a
- (*%%%#) :: (C sh0, Eq sh0, C sh1, Eq sh1, Floating a) => (Hermitian sh0 a, General sh0 sh1 a) -> Hermitian sh1 a -> Hermitian (sh0 :+: sh1) a
- split :: (C sh0, C sh1, Floating a) => Hermitian (sh0 :+: sh1) a -> (Hermitian sh0 a, General sh0 sh1 a, Hermitian sh1 a)
- takeTopLeft :: (C sh0, C sh1, Floating a) => Hermitian (sh0 :+: sh1) a -> Hermitian sh0 a
- takeTopRight :: (C sh0, C sh1, Floating a) => Hermitian (sh0 :+: sh1) a -> General sh0 sh1 a
- takeBottomRight :: (C sh0, C sh1, Floating a) => Hermitian (sh0 :+: sh1) a -> Hermitian sh1 a
- multiplyVector :: (C sh, Eq sh, Floating a) => Transposition -> Hermitian sh a -> Vector sh a -> Vector sh a
- square :: (C sh, Eq sh, Floating a) => Hermitian sh a -> Hermitian sh a
- multiplyFull :: (C vert, C horiz, C height, Eq height, C width, Floating a) => Transposition -> Hermitian height a -> Full vert horiz height width a -> Full vert horiz height width a
- outer :: (C sh, Floating a) => Order -> Vector sh a -> Hermitian sh a
- sumRank1 :: (C sh, Eq sh, Floating a) => Order -> sh -> [(RealOf a, Vector sh a)] -> Hermitian sh a
- sumRank1NonEmpty :: (C sh, Eq sh, Floating a) => Order -> T [] (RealOf a, Vector sh a) -> Hermitian sh a
- sumRank2 :: (C sh, Eq sh, Floating a) => Order -> sh -> [(a, (Vector sh a, Vector sh a))] -> Hermitian sh a
- sumRank2NonEmpty :: (C sh, Eq sh, Floating a) => Order -> T [] (a, (Vector sh a, Vector sh a)) -> Hermitian sh a
- toSquare :: (C sh, Floating a) => Hermitian sh a -> Square sh a
- fromSymmetric :: (C sh, Real a) => Symmetric sh a -> Hermitian sh a
- gramian :: (C height, C width, Floating a) => General height width a -> Hermitian width a
- gramianAdjoint :: (C height, C width, Floating a) => General height width a -> Hermitian height a
- congruenceDiagonal :: (C height, Eq height, C width, Floating a) => Vector height (RealOf a) -> General height width a -> Hermitian width a
- congruenceDiagonalAdjoint :: (C height, C width, Eq width, Floating a) => General height width a -> Vector width (RealOf a) -> Hermitian height a
- congruence :: (C height, Eq height, C width, Floating a) => Hermitian height a -> General height width a -> Hermitian width a
- congruenceAdjoint :: (C height, C width, Eq width, Floating a) => General height width a -> Hermitian width a -> Hermitian height a
- anticommutator :: (C vert, C horiz, C height, Eq height, C width, Eq width, Floating a) => Full vert horiz height width a -> Full vert horiz height width a -> Hermitian width a
- anticommutatorAdjoint :: (C vert, C horiz, C height, Eq height, C width, Eq width, Floating a) => Full vert horiz height width a -> Full vert horiz height width a -> Hermitian height a
- addAdjoint :: (C sh, Floating a) => Square sh a -> Hermitian sh a
- solve :: (C vert, C horiz, C sh, Eq sh, C nrhs, Floating a) => Hermitian sh a -> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
- inverse :: (C sh, Floating a) => Hermitian sh a -> Hermitian sh a
- determinant :: (C sh, Floating a) => Hermitian sh a -> RealOf a
- eigenvalues :: (C sh, Floating a) => Hermitian sh a -> Vector sh (RealOf a)
- eigensystem :: (C sh, Floating a) => Hermitian sh a -> (Square sh a, Vector sh (RealOf a))
Documentation
type Hermitian sh = ArrayMatrix (Hermitian sh) Source #
data Transposition Source #
Instances
stack :: (C sh0, Eq sh0, C sh1, Eq sh1, Floating a) => Hermitian sh0 a -> General sh0 sh1 a -> Hermitian sh1 a -> Hermitian (sh0 :+: sh1) a Source #
toSquare (stack a b c) = toSquare a ||| b === adjoint b ||| toSquare c
It holds order (stack a b c) = order b
.
The function is most efficient when the order of all blocks match.
(*%%%#) :: (C sh0, Eq sh0, C sh1, Eq sh1, Floating a) => (Hermitian sh0 a, General sh0 sh1 a) -> Hermitian sh1 a -> Hermitian (sh0 :+: sh1) a infixr 2 Source #
split :: (C sh0, C sh1, Floating a) => Hermitian (sh0 :+: sh1) a -> (Hermitian sh0 a, General sh0 sh1 a, Hermitian sh1 a) Source #
takeTopRight :: (C sh0, C sh1, Floating a) => Hermitian (sh0 :+: sh1) a -> General sh0 sh1 a Source #
takeBottomRight :: (C sh0, C sh1, Floating a) => Hermitian (sh0 :+: sh1) a -> Hermitian sh1 a Source #
multiplyVector :: (C sh, Eq sh, Floating a) => Transposition -> Hermitian sh a -> Vector sh a -> Vector sh a Source #
multiplyFull :: (C vert, C horiz, C height, Eq height, C width, Floating a) => Transposition -> Hermitian height a -> Full vert horiz height width a -> Full vert horiz height width a Source #
sumRank1 :: (C sh, Eq sh, Floating a) => Order -> sh -> [(RealOf a, Vector sh a)] -> Hermitian sh a Source #
sumRank1NonEmpty :: (C sh, Eq sh, Floating a) => Order -> T [] (RealOf a, Vector sh a) -> Hermitian sh a Source #
sumRank2 :: (C sh, Eq sh, Floating a) => Order -> sh -> [(a, (Vector sh a, Vector sh a))] -> Hermitian sh a Source #
sumRank2NonEmpty :: (C sh, Eq sh, Floating a) => Order -> T [] (a, (Vector sh a, Vector sh a)) -> Hermitian sh a Source #
gramian :: (C height, C width, Floating a) => General height width a -> Hermitian width a Source #
gramian A = A^H * A
gramianAdjoint :: (C height, C width, Floating a) => General height width a -> Hermitian height a Source #
gramianAdjoint A = A * A^H = gramian (A^H)
congruenceDiagonal :: (C height, Eq height, C width, Floating a) => Vector height (RealOf a) -> General height width a -> Hermitian width a Source #
congruenceDiagonal D A = A^H * D * A
congruenceDiagonalAdjoint :: (C height, C width, Eq width, Floating a) => General height width a -> Vector width (RealOf a) -> Hermitian height a Source #
congruenceDiagonalAdjoint A D = A * D * A^H
congruence :: (C height, Eq height, C width, Floating a) => Hermitian height a -> General height width a -> Hermitian width a Source #
congruence B A = A^H * B * A
congruenceAdjoint :: (C height, C width, Eq width, Floating a) => General height width a -> Hermitian width a -> Hermitian height a Source #
congruenceAdjoint B A = A * B * A^H
anticommutator :: (C vert, C horiz, C height, Eq height, C width, Eq width, Floating a) => Full vert horiz height width a -> Full vert horiz height width a -> Hermitian width a Source #
anticommutator A B = A^H * B + B^H * A
Not exactly a matrix anticommutator, thus I like to call it Hermitian anticommutator.
anticommutatorAdjoint :: (C vert, C horiz, C height, Eq height, C width, Eq width, Floating a) => Full vert horiz height width a -> Full vert horiz height width a -> Hermitian height a Source #
anticommutatorAdjoint A B = A * B^H + B * A^H = anticommutator (adjoint A) (adjoint B)