Copyright | (c) Alberto Ruiz 2014 |
---|---|
License | BSD3 |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Experimental interface with statically checked dimensions.
See code examples at http://dis.um.es/~alberto/hmatrix/static.html.
Synopsis
- type ℝ = Double
- data R n
- vec2 :: ℝ -> ℝ -> R 2
- vec3 :: ℝ -> ℝ -> ℝ -> R 3
- vec4 :: ℝ -> ℝ -> ℝ -> ℝ -> R 4
- (&) :: forall n. KnownNat n => R n -> ℝ -> R (n + 1)
- (#) :: forall n m. (KnownNat n, KnownNat m) => R n -> R m -> R (n + m)
- split :: forall p n. (KnownNat p, KnownNat n, p <= n) => R n -> (R p, R (n - p))
- headTail :: (KnownNat n, 1 <= n) => R n -> (ℝ, R (n - 1))
- vector :: KnownNat n => [ℝ] -> R n
- linspace :: forall n. KnownNat n => (ℝ, ℝ) -> R n
- range :: forall n. KnownNat n => R n
- dim :: forall n. KnownNat n => R n
- data L m n
- type Sq n = L n n
- build :: forall m n. (KnownNat n, KnownNat m) => (ℝ -> ℝ -> ℝ) -> L m n
- row :: R n -> L 1 n
- col :: forall (n :: Nat). KnownNat n => R n -> L n 1
- (|||) :: forall (c :: Nat) (r1 :: Nat) (r2 :: Nat). (KnownNat c, KnownNat (r1 + r2), KnownNat r1, KnownNat r2) => L c r1 -> L c r2 -> L c (r1 + r2)
- (===) :: (KnownNat r1, KnownNat r2, KnownNat c) => L r1 c -> L r2 c -> L (r1 + r2) c
- splitRows :: forall p m n. (KnownNat p, KnownNat m, KnownNat n, p <= m) => L m n -> (L p n, L (m - p) n)
- splitCols :: forall p m n. (KnownNat p, KnownNat m, KnownNat n, KnownNat (n - p), p <= n) => L m n -> (L m p, L m (n - p))
- unrow :: L 1 n -> R n
- uncol :: forall (n :: Nat). KnownNat n => L n 1 -> R n
- tr :: Transposable m mt => m -> mt
- eye :: KnownNat n => Sq n
- diag :: KnownNat n => R n -> Sq n
- blockAt :: forall m n. (KnownNat m, KnownNat n) => ℝ -> Int -> Int -> Matrix Double -> L m n
- matrix :: (KnownNat m, KnownNat n) => [ℝ] -> L m n
- type ℂ = Complex Double
- data C n
- data M m n
- data Her n
- her :: KnownNat n => M n n -> Her n
- 𝑖 :: Sized ℂ s c => s
- toComplex :: KnownNat n => (R n, R n) -> C n
- fromComplex :: KnownNat n => C n -> (R n, R n)
- complex :: KnownNat n => R n -> C n
- real :: KnownNat n => C n -> R n
- imag :: KnownNat n => C n -> R n
- sqMagnitude :: KnownNat n => C n -> R n
- magnitude :: KnownNat n => C n -> R n
- (<>) :: forall m k n. (KnownNat m, KnownNat k, KnownNat n) => L m k -> L k n -> L m n
- (#>) :: (KnownNat m, KnownNat n) => L m n -> R n -> R m
- (<.>) :: KnownNat n => R n -> R n -> ℝ
- linSolve :: (KnownNat m, KnownNat n) => L m m -> L m n -> Maybe (L m n)
- (<\>) :: (KnownNat m, KnownNat n, KnownNat r) => L m n -> L m r -> L n r
- svd :: (KnownNat m, KnownNat n) => L m n -> (L m m, R n, L n n)
- withCompactSVD :: forall m n z. (KnownNat m, KnownNat n) => L m n -> (forall k. KnownNat k => (L m k, R k, L n k) -> z) -> z
- svdTall :: (KnownNat m, KnownNat n, n <= m) => L m n -> (L m n, R n, L n n)
- svdFlat :: (KnownNat m, KnownNat n, m <= n) => L m n -> (L m m, R m, L n m)
- class Eigen m l v | m -> l, m -> v where
- eigensystem :: m -> (l, v)
- eigenvalues :: m -> l
- withNullspace :: forall m n z. (KnownNat m, KnownNat n) => L m n -> (forall k. KnownNat k => L n k -> z) -> z
- withOrth :: forall m n z. (KnownNat m, KnownNat n) => L m n -> (forall k. KnownNat k => L n k -> z) -> z
- qr :: (KnownNat m, KnownNat n) => L m n -> (L m m, L m n)
- chol :: KnownNat n => Sym n -> Sq n
- class Normed a where
- type Seed = Int
- data RandDist
- randomVector :: forall n. KnownNat n => Seed -> RandDist -> R n
- rand :: forall m n. (KnownNat m, KnownNat n) => IO (L m n)
- randn :: forall m n. (KnownNat m, KnownNat n) => IO (L m n)
- gaussianSample :: forall m n. (KnownNat m, KnownNat n) => Seed -> R n -> Sym n -> L m n
- uniformSample :: forall m n. (KnownNat m, KnownNat n) => Seed -> R n -> R n -> L m n
- mean :: (KnownNat n, 1 <= n) => R n -> ℝ
- meanCov :: forall m n. (KnownNat m, KnownNat n, 1 <= m) => L m n -> (R n, Sym n)
- class Disp t where
- class Domain field vec mat | mat -> vec field, vec -> mat field, field -> mat vec where
- mul :: forall m k n. (KnownNat m, KnownNat k, KnownNat n) => mat m k -> mat k n -> mat m n
- app :: forall m n. (KnownNat m, KnownNat n) => mat m n -> vec n -> vec m
- dot :: forall n. KnownNat n => vec n -> vec n -> field
- cross :: vec 3 -> vec 3 -> vec 3
- diagR :: forall m n k. (KnownNat m, KnownNat n, KnownNat k) => field -> vec k -> mat m n
- dvmap :: forall n. KnownNat n => (field -> field) -> vec n -> vec n
- dmmap :: forall n m. (KnownNat m, KnownNat n) => (field -> field) -> mat n m -> mat n m
- outer :: forall n m. (KnownNat m, KnownNat n) => vec n -> vec m -> mat n m
- zipWithVector :: forall n. KnownNat n => (field -> field -> field) -> vec n -> vec n -> vec n
- det :: forall n. KnownNat n => mat n n -> field
- invlndet :: forall n. KnownNat n => mat n n -> (mat n n, (field, field))
- expm :: forall n. KnownNat n => mat n n -> mat n n
- sqrtm :: forall n. KnownNat n => mat n n -> mat n n
- inv :: forall n. KnownNat n => mat n n -> mat n n
- withVector :: forall z. Vector ℝ -> (forall n. KnownNat n => R n -> z) -> z
- withMatrix :: forall z. Matrix ℝ -> (forall m n. (KnownNat m, KnownNat n) => L m n -> z) -> z
- exactLength :: forall n m. (KnownNat n, KnownNat m) => R m -> Maybe (R n)
- exactDims :: forall n m j k. (KnownNat n, KnownNat m, KnownNat j, KnownNat k) => L m n -> Maybe (L j k)
- toRows :: forall m n. (KnownNat m, KnownNat n) => L m n -> [R n]
- toColumns :: forall m n. (KnownNat m, KnownNat n) => L m n -> [R m]
- withRows :: forall n z. KnownNat n => [R n] -> (forall m. KnownNat m => L m n -> z) -> z
- withColumns :: forall m z. KnownNat m => [R m] -> (forall n. KnownNat n => L m n -> z) -> z
- class Num t => Sized t s d | s -> t, s -> d where
- class Diag m d | m -> d where
- takeDiag :: m -> d
- data Sym n
- sym :: KnownNat n => Sq n -> Sym n
- mTm :: (KnownNat m, KnownNat n) => L m n -> Sym n
- unSym :: Sym n -> Sq n
- (<·>) :: KnownNat n => R n -> R n -> ℝ
Vector
Instances
Domain ℝ R L Source # | |
Defined in Numeric.LinearAlgebra.Static mul :: forall (m :: Nat) (k :: Nat) (n :: Nat). (KnownNat m, KnownNat k, KnownNat n) => L m k -> L k n -> L m n Source # app :: forall (m :: Nat) (n :: Nat). (KnownNat m, KnownNat n) => L m n -> R n -> R m Source # dot :: forall (n :: Nat). KnownNat n => R n -> R n -> ℝ Source # cross :: R 3 -> R 3 -> R 3 Source # diagR :: forall (m :: Nat) (n :: Nat) (k :: Nat). (KnownNat m, KnownNat n, KnownNat k) => ℝ -> R k -> L m n Source # dvmap :: forall (n :: Nat). KnownNat n => (ℝ -> ℝ) -> R n -> R n Source # dmmap :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => (ℝ -> ℝ) -> L n m -> L n m Source # outer :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => R n -> R m -> L n m Source # zipWithVector :: forall (n :: Nat). KnownNat n => (ℝ -> ℝ -> ℝ) -> R n -> R n -> R n Source # det :: forall (n :: Nat). KnownNat n => L n n -> ℝ Source # invlndet :: forall (n :: Nat). KnownNat n => L n n -> (L n n, (ℝ, ℝ)) Source # expm :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # sqrtm :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # inv :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # | |
KnownNat n => Sized ℝ (R n) Vector Source # | |
Floating (R n) Source # | |
Fractional (R n) Source # | |
Num (R n) Source # | |
KnownNat n => Show (R n) Source # | |
Generic (R n) Source # | |
KnownNat n => Binary (R n) Source # | |
NFData (R n) Source # | |
Defined in Internal.Static | |
Additive (R n) Source # | |
KnownNat n => Normed (R n) Source # | |
KnownNat n => Disp (R n) Source # | |
KnownNat n => Eigen (Sym n) (R n) (L n n) Source # | |
Defined in Numeric.LinearAlgebra.Static | |
KnownNat n => Diag (L n n) (R n) Source # | |
type Rep (R n) Source # | |
Defined in Internal.Static |
Matrix
Instances
Domain ℝ R L Source # | |
Defined in Numeric.LinearAlgebra.Static mul :: forall (m :: Nat) (k :: Nat) (n :: Nat). (KnownNat m, KnownNat k, KnownNat n) => L m k -> L k n -> L m n Source # app :: forall (m :: Nat) (n :: Nat). (KnownNat m, KnownNat n) => L m n -> R n -> R m Source # dot :: forall (n :: Nat). KnownNat n => R n -> R n -> ℝ Source # cross :: R 3 -> R 3 -> R 3 Source # diagR :: forall (m :: Nat) (n :: Nat) (k :: Nat). (KnownNat m, KnownNat n, KnownNat k) => ℝ -> R k -> L m n Source # dvmap :: forall (n :: Nat). KnownNat n => (ℝ -> ℝ) -> R n -> R n Source # dmmap :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => (ℝ -> ℝ) -> L n m -> L n m Source # outer :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => R n -> R m -> L n m Source # zipWithVector :: forall (n :: Nat). KnownNat n => (ℝ -> ℝ -> ℝ) -> R n -> R n -> R n Source # det :: forall (n :: Nat). KnownNat n => L n n -> ℝ Source # invlndet :: forall (n :: Nat). KnownNat n => L n n -> (L n n, (ℝ, ℝ)) Source # expm :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # sqrtm :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # inv :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # | |
(KnownNat m, KnownNat n) => Sized ℝ (L m n) Matrix Source # | |
KnownNat n => Eigen (Sym n) (R n) (L n n) Source # | |
Defined in Numeric.LinearAlgebra.Static | |
KnownNat n => Eigen (Sq n) (C n) (M n n) Source # | |
Defined in Numeric.LinearAlgebra.Static | |
(KnownNat n, KnownNat m) => Floating (L n m) Source # | |
(KnownNat n, KnownNat m) => Fractional (L n m) Source # | |
(KnownNat n, KnownNat m) => Num (L n m) Source # | |
(KnownNat m, KnownNat n) => Show (L m n) Source # | |
Generic (L m n) Source # | |
(KnownNat m, KnownNat n) => Binary (L m n) Source # | |
NFData (L n m) Source # | |
Defined in Internal.Static | |
(KnownNat n', KnownNat m') => Testable (L n' m') Source # | |
(KnownNat m, KnownNat n) => Additive (L m n) Source # | |
(KnownNat m, KnownNat n) => Normed (L m n) Source # | |
(KnownNat m, KnownNat n) => Disp (L m n) Source # | |
KnownNat n => Diag (L n n) (R n) Source # | |
(KnownNat n, KnownNat m) => Transposable (L m n) (L n m) Source # | |
type Rep (L m n) Source # | |
Defined in Internal.Static |
(|||) :: forall (c :: Nat) (r1 :: Nat) (r2 :: Nat). (KnownNat c, KnownNat (r1 + r2), KnownNat r1, KnownNat r2) => L c r1 -> L c r2 -> L c (r1 + r2) infixl 3 Source #
(===) :: (KnownNat r1, KnownNat r2, KnownNat c) => L r1 c -> L r2 c -> L (r1 + r2) c infixl 2 Source #
splitRows :: forall p m n. (KnownNat p, KnownNat m, KnownNat n, p <= m) => L m n -> (L p n, L (m - p) n) Source #
splitCols :: forall p m n. (KnownNat p, KnownNat m, KnownNat n, KnownNat (n - p), p <= n) => L m n -> (L m p, L m (n - p)) Source #
tr :: Transposable m mt => m -> mt Source #
conjugate transpose
blockAt :: forall m n. (KnownNat m, KnownNat n) => ℝ -> Int -> Int -> Matrix Double -> L m n Source #
Complex
Instances
Domain ℂ C M Source # | |
Defined in Numeric.LinearAlgebra.Static mul :: forall (m :: Nat) (k :: Nat) (n :: Nat). (KnownNat m, KnownNat k, KnownNat n) => M m k -> M k n -> M m n Source # app :: forall (m :: Nat) (n :: Nat). (KnownNat m, KnownNat n) => M m n -> C n -> C m Source # dot :: forall (n :: Nat). KnownNat n => C n -> C n -> ℂ Source # cross :: C 3 -> C 3 -> C 3 Source # diagR :: forall (m :: Nat) (n :: Nat) (k :: Nat). (KnownNat m, KnownNat n, KnownNat k) => ℂ -> C k -> M m n Source # dvmap :: forall (n :: Nat). KnownNat n => (ℂ -> ℂ) -> C n -> C n Source # dmmap :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => (ℂ -> ℂ) -> M n m -> M n m Source # outer :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => C n -> C m -> M n m Source # zipWithVector :: forall (n :: Nat). KnownNat n => (ℂ -> ℂ -> ℂ) -> C n -> C n -> C n Source # det :: forall (n :: Nat). KnownNat n => M n n -> ℂ Source # invlndet :: forall (n :: Nat). KnownNat n => M n n -> (M n n, (ℂ, ℂ)) Source # expm :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # sqrtm :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # inv :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # | |
KnownNat n => Sized ℂ (C n) Vector Source # | |
Floating (C n) Source # | |
Fractional (C n) Source # | |
Num (C n) Source # | |
KnownNat n => Show (C n) Source # | |
Generic (C n) Source # | |
NFData (C n) Source # | |
Defined in Internal.Static | |
Additive (C n) Source # | |
KnownNat n => Disp (C n) Source # | |
KnownNat n => Eigen (Sq n) (C n) (M n n) Source # | |
Defined in Numeric.LinearAlgebra.Static | |
KnownNat n => Diag (M n n) (C n) Source # | |
type Rep (C n) Source # | |
Defined in Internal.Static |
Instances
Domain ℂ C M Source # | |
Defined in Numeric.LinearAlgebra.Static mul :: forall (m :: Nat) (k :: Nat) (n :: Nat). (KnownNat m, KnownNat k, KnownNat n) => M m k -> M k n -> M m n Source # app :: forall (m :: Nat) (n :: Nat). (KnownNat m, KnownNat n) => M m n -> C n -> C m Source # dot :: forall (n :: Nat). KnownNat n => C n -> C n -> ℂ Source # cross :: C 3 -> C 3 -> C 3 Source # diagR :: forall (m :: Nat) (n :: Nat) (k :: Nat). (KnownNat m, KnownNat n, KnownNat k) => ℂ -> C k -> M m n Source # dvmap :: forall (n :: Nat). KnownNat n => (ℂ -> ℂ) -> C n -> C n Source # dmmap :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => (ℂ -> ℂ) -> M n m -> M n m Source # outer :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => C n -> C m -> M n m Source # zipWithVector :: forall (n :: Nat). KnownNat n => (ℂ -> ℂ -> ℂ) -> C n -> C n -> C n Source # det :: forall (n :: Nat). KnownNat n => M n n -> ℂ Source # invlndet :: forall (n :: Nat). KnownNat n => M n n -> (M n n, (ℂ, ℂ)) Source # expm :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # sqrtm :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # inv :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # | |
(KnownNat m, KnownNat n) => Sized ℂ (M m n) Matrix Source # | |
KnownNat n => Eigen (Sq n) (C n) (M n n) Source # | |
Defined in Numeric.LinearAlgebra.Static | |
(KnownNat n, KnownNat m) => Floating (M n m) Source # | |
(KnownNat n, KnownNat m) => Fractional (M n m) Source # | |
(KnownNat n, KnownNat m) => Num (M n m) Source # | |
(KnownNat m, KnownNat n) => Show (M m n) Source # | |
Generic (M m n) Source # | |
NFData (M n m) Source # | |
Defined in Internal.Static | |
(KnownNat m, KnownNat n) => Additive (M m n) Source # | |
(KnownNat m, KnownNat n) => Disp (M m n) Source # | |
KnownNat n => Diag (M n n) (C n) Source # | |
(KnownNat n, KnownNat m) => Transposable (M m n) (M n m) Source # | |
type Rep (M m n) Source # | |
Defined in Internal.Static |
Products
(<>) :: forall m k n. (KnownNat m, KnownNat k, KnownNat n) => L m k -> L k n -> L m n infixr 8 Source #
Linear Systems
Factorizations
withCompactSVD :: forall m n z. (KnownNat m, KnownNat n) => L m n -> (forall k. KnownNat k => (L m k, R k, L n k) -> z) -> z Source #
class Eigen m l v | m -> l, m -> v where Source #
eigensystem :: m -> (l, v) Source #
eigenvalues :: m -> l Source #
withNullspace :: forall m n z. (KnownNat m, KnownNat n) => L m n -> (forall k. KnownNat k => L n k -> z) -> z Source #
withOrth :: forall m n z. (KnownNat m, KnownNat n) => L m n -> (forall k. KnownNat k => L n k -> z) -> z Source #
Norms
p-norm for vectors, operator norm for matrices
Instances
Normed (Vector Float) Source # | |
Normed (Vector (Complex Float)) Source # | |
Normed (Vector C) Source # | |
Normed (Vector R) Source # | |
Normed (Vector Z) Source # | |
Normed (Vector I) Source # | |
KnownNat m => Normed (Vector (Mod m Z)) Source # | |
KnownNat m => Normed (Vector (Mod m I)) Source # | |
Normed (Matrix C) Source # | |
Normed (Matrix R) Source # | |
KnownNat n => Normed (R n) Source # | |
(KnownNat m, KnownNat n) => Normed (L m n) Source # | |
Random arrays
Uniform | uniform distribution in [0,1) |
Gaussian | normal distribution with mean zero and standard deviation one |
Instances
Enum RandDist Source # | |
Misc
class Domain field vec mat | mat -> vec field, vec -> mat field, field -> mat vec where Source #
mul :: forall m k n. (KnownNat m, KnownNat k, KnownNat n) => mat m k -> mat k n -> mat m n Source #
app :: forall m n. (KnownNat m, KnownNat n) => mat m n -> vec n -> vec m Source #
dot :: forall n. KnownNat n => vec n -> vec n -> field Source #
cross :: vec 3 -> vec 3 -> vec 3 Source #
diagR :: forall m n k. (KnownNat m, KnownNat n, KnownNat k) => field -> vec k -> mat m n Source #
dvmap :: forall n. KnownNat n => (field -> field) -> vec n -> vec n Source #
dmmap :: forall n m. (KnownNat m, KnownNat n) => (field -> field) -> mat n m -> mat n m Source #
outer :: forall n m. (KnownNat m, KnownNat n) => vec n -> vec m -> mat n m Source #
zipWithVector :: forall n. KnownNat n => (field -> field -> field) -> vec n -> vec n -> vec n Source #
det :: forall n. KnownNat n => mat n n -> field Source #
invlndet :: forall n. KnownNat n => mat n n -> (mat n n, (field, field)) Source #
expm :: forall n. KnownNat n => mat n n -> mat n n Source #
sqrtm :: forall n. KnownNat n => mat n n -> mat n n Source #
Instances
Domain ℂ C M Source # | |
Defined in Numeric.LinearAlgebra.Static mul :: forall (m :: Nat) (k :: Nat) (n :: Nat). (KnownNat m, KnownNat k, KnownNat n) => M m k -> M k n -> M m n Source # app :: forall (m :: Nat) (n :: Nat). (KnownNat m, KnownNat n) => M m n -> C n -> C m Source # dot :: forall (n :: Nat). KnownNat n => C n -> C n -> ℂ Source # cross :: C 3 -> C 3 -> C 3 Source # diagR :: forall (m :: Nat) (n :: Nat) (k :: Nat). (KnownNat m, KnownNat n, KnownNat k) => ℂ -> C k -> M m n Source # dvmap :: forall (n :: Nat). KnownNat n => (ℂ -> ℂ) -> C n -> C n Source # dmmap :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => (ℂ -> ℂ) -> M n m -> M n m Source # outer :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => C n -> C m -> M n m Source # zipWithVector :: forall (n :: Nat). KnownNat n => (ℂ -> ℂ -> ℂ) -> C n -> C n -> C n Source # det :: forall (n :: Nat). KnownNat n => M n n -> ℂ Source # invlndet :: forall (n :: Nat). KnownNat n => M n n -> (M n n, (ℂ, ℂ)) Source # expm :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # sqrtm :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # inv :: forall (n :: Nat). KnownNat n => M n n -> M n n Source # | |
Domain ℝ R L Source # | |
Defined in Numeric.LinearAlgebra.Static mul :: forall (m :: Nat) (k :: Nat) (n :: Nat). (KnownNat m, KnownNat k, KnownNat n) => L m k -> L k n -> L m n Source # app :: forall (m :: Nat) (n :: Nat). (KnownNat m, KnownNat n) => L m n -> R n -> R m Source # dot :: forall (n :: Nat). KnownNat n => R n -> R n -> ℝ Source # cross :: R 3 -> R 3 -> R 3 Source # diagR :: forall (m :: Nat) (n :: Nat) (k :: Nat). (KnownNat m, KnownNat n, KnownNat k) => ℝ -> R k -> L m n Source # dvmap :: forall (n :: Nat). KnownNat n => (ℝ -> ℝ) -> R n -> R n Source # dmmap :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => (ℝ -> ℝ) -> L n m -> L n m Source # outer :: forall (n :: Nat) (m :: Nat). (KnownNat m, KnownNat n) => R n -> R m -> L n m Source # zipWithVector :: forall (n :: Nat). KnownNat n => (ℝ -> ℝ -> ℝ) -> R n -> R n -> R n Source # det :: forall (n :: Nat). KnownNat n => L n n -> ℝ Source # invlndet :: forall (n :: Nat). KnownNat n => L n n -> (L n n, (ℝ, ℝ)) Source # expm :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # sqrtm :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # inv :: forall (n :: Nat). KnownNat n => L n n -> L n n Source # |
withMatrix :: forall z. Matrix ℝ -> (forall m n. (KnownNat m, KnownNat n) => L m n -> z) -> z Source #
exactLength :: forall n m. (KnownNat n, KnownNat m) => R m -> Maybe (R n) Source #
Useful for constraining two dependently typed vectors to match each other in length when they are unknown at compile-time.
exactDims :: forall n m j k. (KnownNat n, KnownNat m, KnownNat j, KnownNat k) => L m n -> Maybe (L j k) Source #
Useful for constraining two dependently typed matrices to match each other in dimensions when they are unknown at compile-time.
withColumns :: forall m z. KnownNat m => [R m] -> (forall n. KnownNat n => L m n -> z) -> z Source #
Instances
KnownNat n => Floating (Sym n) Source # | |
KnownNat n => Fractional (Sym n) Source # | |
KnownNat n => Num (Sym n) Source # | |
KnownNat n => Show (Sym n) Source # | |
KnownNat n => Additive (Sym n) Source # | |
KnownNat n => Disp (Sym n) Source # | |
KnownNat n => Transposable (Sym n) (Sym n) Source # | |
KnownNat n => Eigen (Sym n) (R n) (L n n) Source # | |
Defined in Numeric.LinearAlgebra.Static |