cifl-math-library-1.1.1.0: Math libraries
Copyright(c) Esa Pulkkinen 2018
LicenseLGPL
Maintaineresa.pulkkinen@iki.fi
Safe HaskellSafe
LanguageHaskell2010

Math.Matrix.Covector

Description

For background material, see K. Chandrasekhara Rao: Functional Analysis.

See also: http://theoreticalminimum.com/courses/advanced-quantum-mechanics/2013/fall/lecture-1

Synopsis

Documentation

contract :: (Scalar (v a) ~ a, LinearTransform v Vector1 a) => (Dual :*: v) a -> (Vector1 :*: v) a -> Scalar (v a) Source #

dual_apply :: LinearTransform v Vector1 a => Dual (v a) -> v a -> a Source #

(*><) :: a ~ Scalar (v a) => Dual (v a) -> v a :-> Vector1 a Source #

(∇) :: VectorDerivative v d arr => d v -> arr v v Source #

unicode support for gradient. Use with parenthesis.

(∇·) :: VectorDerivative v d arr => arr v v -> d v Source #

unicode support for divergence. Use with parenthesis.

(·∇) :: (VectorDerivative v d arr, InnerProductSpace v) => v -> d v -> d v Source #

unicode support for directional derivative. Binary operator.

(∇×) :: VectorCrossProduct v arr => arr v v -> arr v v Source #

unicode support for curl. Use with parenthesis.

(∇·∇) :: VectorDerivative v d arr => d v -> d v Source #

unicode support for laplace. Use with parenthesis.

(∇×∇×) :: VectorCrossProduct v arr => arr v v -> arr v v Source #

dconst :: (Scalar (f v) ~ v, Dualizable (f v) d, Linearizable LinearMap (:*:) f Vector1 v, Diagonalizable f v) => v -> d (f v) Source #

outer_vector :: (Linearizable LinearMap (:*:) f g w, DualNum f w, DualNum g w) => Dual (f w) -> g w -> f w :-> g w Source #

(⊹) :: (Linearizable LinearMap (:*:) m m a, Linearizable LinearMap (:*:) m n a, Linearizable LinearMap (:*:) n m a, Diagonalizable m a, Diagonalizable n a, LinearIso n m a, Transposable m n a, ConjugateSymmetric (m a)) => (m a :-> n a) -> n a :-> m a Source #

unicode alias (unicode HERMITIAN CONJUGATE MATRIX character)

bravector :: (DualNum f v, InnerProductSpace (f v)) => f v -> Dual (f v) Source #

partial application of dot product on second argument (- %. v).

ketvector :: (DualNum f v, InnerProductSpace (f v)) => f v -> Dual (f v) Source #

partial application of dot product on first argument: (v %. -).

kronecker :: (Eq i, Functor n, Functor m, Num c) => m i -> n i -> (m :*: n) c Source #

dual_bilinear :: DualNum f v => (f v -> f v -> v) -> f v -> Dual (f v) Source #

kronecker_dual :: (DualNum f a, Eq (f a), Num a) => f a -> Dual (f a) Source #

adjoint :: (f a :-> f a) -> Dual (f a) -> Dual (f a) Source #

would like to make adjoint as instance of CoFunctor, but the constraint prevents. Instead we declare LinearMap.

scalar_map :: a ~ Scalar (f a) => (Vector1 a :-> Vector1 a) -> Dual (f a) -> Dual (f a) Source #

operator_map :: (Scalar (w a) ~ a, Dualizable (w a) Dual, Dualizable (v a) Dual, Diagonalizable w a, LinearTransform v Vector1 a, Linearizable LinearMap (:*:) w Vector1 a) => ((v a -> a) -> w a -> a) -> Dual (v a) -> Dual (w a) Source #

dual_derivative :: (VectorDerivative v Dual LinearMap, VectorDerivative w Dual LinearMap, InnerProductSpace v, InnerProductSpace w) => (Dual v -> Dual w -> c) -> v -> w -> Dual v -> Dual w -> c Source #

This computes \(DDM(\otimes,{\bar{x}},{\bar{y}}) = [({\bar{x}} \cdot \nabla) \times ({\bar{y}} \cdot \nabla)]\) where \(\times\) is the outer product for linear operators derived from product of dual spaces \(\otimes\). Notice \({\bar{x}} \cdot \nabla\) is normally called the directional derivative, so this is really a two dimensional version of directional derivative with some possibility to choose how two dual vectors are combined.

dual_differential_dot_product :: (DualNum f v, VectorDerivative (f v) Dual LinearMap, InnerProductSpace (f v), StandardBasis (f v)) => f v -> f v -> Dual (f v) -> Dual (f v) -> Scalar (Dual (f v)) Source #

Orphan instances

(Dualizable (f v) Dual, LinearTransform f Vector1 v, ConjugateSymmetric v, Linearizable LinearMap ((:*:) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) f Vector1 v, FractionalSpace (f v), v ~ Scalar (f v), Floating v, Diagonalizable f v) => Floating (Dual (f v)) Source # 
Instance details

Methods

pi :: Dual (f v) #

exp :: Dual (f v) -> Dual (f v) #

log :: Dual (f v) -> Dual (f v) #

sqrt :: Dual (f v) -> Dual (f v) #

(**) :: Dual (f v) -> Dual (f v) -> Dual (f v) #

logBase :: Dual (f v) -> Dual (f v) -> Dual (f v) #

sin :: Dual (f v) -> Dual (f v) #

cos :: Dual (f v) -> Dual (f v) #

tan :: Dual (f v) -> Dual (f v) #

asin :: Dual (f v) -> Dual (f v) #

acos :: Dual (f v) -> Dual (f v) #

atan :: Dual (f v) -> Dual (f v) #

sinh :: Dual (f v) -> Dual (f v) #

cosh :: Dual (f v) -> Dual (f v) #

tanh :: Dual (f v) -> Dual (f v) #

asinh :: Dual (f v) -> Dual (f v) #

acosh :: Dual (f v) -> Dual (f v) #

atanh :: Dual (f v) -> Dual (f v) #

log1p :: Dual (f v) -> Dual (f v) #

expm1 :: Dual (f v) -> Dual (f v) #

log1pexp :: Dual (f v) -> Dual (f v) #

log1mexp :: Dual (f v) -> Dual (f v) #

DualNum f v => Num (Dual (f v)) Source # 
Instance details

Methods

(+) :: Dual (f v) -> Dual (f v) -> Dual (f v) #

(-) :: Dual (f v) -> Dual (f v) -> Dual (f v) #

(*) :: Dual (f v) -> Dual (f v) -> Dual (f v) #

negate :: Dual (f v) -> Dual (f v) #

abs :: Dual (f v) -> Dual (f v) #

signum :: Dual (f v) -> Dual (f v) #

fromInteger :: Integer -> Dual (f v) #

(DualNum f v, FractionalSpace (f v)) => Fractional (Dual (f v)) Source # 
Instance details

Methods

(/) :: Dual (f v) -> Dual (f v) -> Dual (f v) #

recip :: Dual (f v) -> Dual (f v) #

fromRational :: Rational -> Dual (f v) #

(DualNum f v, StandardBasis (f v), Show v) => Show (Dual (f v)) Source # 
Instance details

Methods

showsPrec :: Int -> Dual (f v) -> ShowS #

show :: Dual (f v) -> String #

showList :: [Dual (f v)] -> ShowS #

(StandardBasis (f v), Num v, VectorSpace (f v), DualNum f v) => InnerProductSpace (Dual (f v)) Source # 
Instance details

Methods

(%.) :: Dual (f v) -> Dual (f v) -> Scalar (Dual (f v)) Source #

(v ~ Scalar (f v), VectorSpace (f v), DualNum f v) => LieAlgebra (Dual (f v)) Source # 
Instance details

Methods

(%<>%) :: Dual (f v) -> Dual (f v) -> Dual (f v) Source #

(Semigroup v, VectorSpace v) => Monoid (LinearMap v v) Source # 
Instance details

Methods

mempty :: LinearMap v v #

mappend :: LinearMap v v -> LinearMap v v -> LinearMap v v #

mconcat :: [LinearMap v v] -> LinearMap v v #

Semigroup v => Semigroup (LinearMap v v) Source # 
Instance details

Methods

(<>) :: LinearMap v v -> LinearMap v v -> LinearMap v v #

sconcat :: NonEmpty (LinearMap v v) -> LinearMap v v #

stimes :: Integral b => b -> LinearMap v v -> LinearMap v v #

(ConjugateSymmetric a, Num a) => StandardBasis ((Dual :*: Vector2) a) Source #

https://en.wikipedia.org/wiki/Dual_space

Instance details