{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE UndecidableInstances #-}
module Numeric.LAPACK.Matrix.Wrapper where
import qualified Numeric.LAPACK.Matrix.Type.Private as Matrix
import qualified Numeric.LAPACK.Matrix.Layout.Private as Layout
import qualified Numeric.LAPACK.Matrix.Extent.Strict as ExtentStrict
import qualified Numeric.LAPACK.Matrix.Extent as Extent
import qualified Numeric.LAPACK.Matrix.Shape as MatrixShape
import qualified Numeric.LAPACK.Matrix.Shape.Omni as Omni
import qualified Numeric.LAPACK.Matrix.Array.Unpacked as Unpacked
import qualified Numeric.LAPACK.Matrix.Array as ArrMatrix
import qualified Numeric.LAPACK.Matrix.Class as MatrixClass
import qualified Numeric.LAPACK.Matrix.Divide as Divide
import qualified Numeric.LAPACK.Matrix.Multiply as Multiply
import Numeric.LAPACK.Matrix.Type.Private (Matrix)
import Numeric.LAPACK.Matrix.Shape (Filled)
import qualified Type.Data.Num.Unary as Unary
import Data.Tuple.HT (mapPair)
data MapExtent typ meas
data instance
Matrix (MapExtent typ meas)
extraLower extraUpper lower upper meas1 vert1 horiz1 height width a
where
MapExtent ::
(Extent.C vert0, Extent.C horiz0) =>
Extent.Map meas0 vert0 horiz0 meas1 vert1 horiz1 height width ->
Matrix typ xl xu lower upper meas0 vert0 horiz0 height width a ->
Matrix (MapExtent typ meas0) (xl,vert0) (xu,horiz0)
lower upper meas1 vert1 horiz1 height width a
type family xl
type instance (xl,ex) = xl
type family MapExtentExtent xl
type instance MapExtentExtent (xl,ex) = ex
instance
(Matrix.Box typ, Extent.Measure meas) =>
Matrix.Box (MapExtent typ meas) where
type (MapExtent typ meas) extra =
(Matrix.BoxExtra typ (MapExtentExtra extra))
extent :: Matrix
(MapExtent typ meas)
xl
xu
lower
upper
meas
vert
horiz
height
width
a
-> Extent meas vert horiz height width
extent (MapExtent m a) = Map meas vert0 horiz0 meas vert horiz height width
-> Map meas vert0 horiz0 meas vert horiz height width
forall measA vertA horizA measB vertB horizB height width.
Map measA vertA horizA measB vertB horizB height width
-> Map measA vertA horizA measB vertB horizB height width
ExtentStrict.apply Map meas vert0 horiz0 meas vert horiz height width
m Map meas vert0 horiz0 meas vert horiz height width
-> Map meas vert0 horiz0 meas vert horiz height width
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Extent meas vert0 horiz0 height width
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
Matrix.extent Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a
instance
(Matrix.Transpose typ, Extent.Measure meas) =>
Matrix.Transpose (MapExtent typ meas) where
type (MapExtent typ meas) extra =
(Matrix.TransposeExtra typ (MapExtentExtra extra))
transpose :: Matrix
(MapExtent typ meas)
xl
xu
lower
upper
meas
vert
horiz
height
width
a
-> Matrix
(MapExtent typ meas)
xu
xl
upper
lower
meas
horiz
vert
width
height
a
transpose (MapExtent m a) =
Map meas horiz0 vert0 meas horiz vert width height
-> Matrix typ xu xl upper lower meas horiz0 vert0 width height a
-> Matrix
(MapExtent typ meas)
(xu, horiz0)
(xl, vert0)
upper
lower
meas
horiz
vert
width
height
a
forall vert0 horiz0 meas0 meas1 vert1 horiz1 height width typ xl xu
lower upper a.
(C vert0, C horiz0) =>
Map meas0 vert0 horiz0 meas1 vert1 horiz1 height width
-> Matrix typ xl xu lower upper meas0 vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas0)
(xl, vert0)
(xu, horiz0)
lower
upper
meas1
vert1
horiz1
height
width
a
MapExtent (Map meas vert0 horiz0 meas vert horiz height width
-> Map meas horiz0 vert0 meas horiz vert width height
forall measA vertA horizA measB vertB horizB height width.
(Measure measA, C vertA, C horizA, Measure measB, C vertB,
C horizB) =>
Map measA vertA horizA measB vertB horizB height width
-> Map measA horizA vertA measB horizB vertB width height
ExtentStrict.transpose Map meas vert0 horiz0 meas vert horiz height width
m) (Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix typ xu xl upper lower meas horiz0 vert0 width height a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a)
instance
(Matrix.Layout typ, Extent.Measure meas) =>
Matrix.Layout (MapExtent typ meas) where
type (MapExtent typ meas) extra =
(Matrix.LayoutExtra typ (MapExtentExtra extra))
layout :: Matrix
(MapExtent typ meas)
xl
xu
lower
upper
meas
vert
horiz
height
width
a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (MapExtent _ a) = Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Array (height, width) (Separator, Maybe (Style, a))
forall typ xl xu meas vert horiz height width a lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
Matrix.layout Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a
instance
(Matrix.Format typ, Extent.Measure meas) =>
Matrix.Format (MapExtent typ meas) where
type (MapExtent typ meas) extra =
(Matrix.FormatExtra typ (MapExtentExtra extra))
format :: Config
-> Matrix
(MapExtent typ meas)
xl
xu
lower
upper
meas
vert
horiz
height
width
a
-> out
format Config
fmt (MapExtent _ a) = Config
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Format typ, FormatExtra typ xl, FormatExtra typ xu, Measure meas,
C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.format Config
fmt Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a
instance
(MatrixClass.Unpack typ, Extent.Measure meas) =>
MatrixClass.Unpack (MapExtent typ meas) where
type (MapExtent typ meas) extra =
(MatrixClass.UnpackExtra typ (MapExtentExtra extra))
unpack :: Matrix
(MapExtent typ meas)
xl
xu
lower
upper
meas
vert
horiz
height
width
a
-> ArrayMatrix
Unpacked Arbitrary lower upper meas vert horiz height width a
unpack (MapExtent m a) =
(FullArray meas vert horiz height width a
-> FullArray meas vert horiz height width a)
-> UnpackedMatrix
Arbitrary Filled Filled meas vert horiz height width a
-> ArrayMatrix
Unpacked Arbitrary lower upper meas vert horiz height width a
forall propertyA lowerA upperA propertyB lowerB upperB measA vertA
horizA heightA widthA a measB vertB horizB heightB widthB b.
(Property propertyA, Strip lowerA, Strip upperA,
Property propertyB, Strip lowerB, Strip upperB) =>
(FullArray measA vertA horizA heightA widthA a
-> FullArray measB vertB horizB heightB widthB b)
-> UnpackedMatrix
propertyA lowerA upperA measA vertA horizA heightA widthA a
-> UnpackedMatrix
propertyB lowerB upperB measB vertB horizB heightB widthB b
ArrMatrix.liftUnpacked1 FullArray meas vert horiz height width a
-> FullArray meas vert horiz height width a
forall a. a -> a
id (UnpackedMatrix
Arbitrary Filled Filled meas vert horiz height width a
-> ArrayMatrix
Unpacked Arbitrary lower upper meas vert horiz height width a)
-> UnpackedMatrix
Arbitrary Filled Filled meas vert horiz height width a
-> ArrayMatrix
Unpacked Arbitrary lower upper meas vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Map meas vert0 horiz0 meas vert horiz height width
-> ArrayMatrix
Unpacked Arbitrary Filled Filled meas vert0 horiz0 height width a
-> UnpackedMatrix
Arbitrary Filled Filled meas vert horiz height width a
forall pack property measA vertA horizA measB vertB horizB lower
upper height width a.
(MapExtent pack, property ~ Arbitrary, Measure measA, C vertA,
C horizA, Measure measB, C vertB, C horizB,
MapExtentStrip pack lower, MapExtentStrip pack upper) =>
Map measA vertA horizA measB vertB horizB height width
-> ArrayMatrix
pack property lower upper measA vertA horizA height width a
-> ArrayMatrix
pack property lower upper measB vertB horizB height width a
ArrMatrix.mapExtent Map meas vert0 horiz0 meas vert horiz height width
m (ArrayMatrix
Unpacked Arbitrary Filled Filled meas vert0 horiz0 height width a
-> UnpackedMatrix
Arbitrary Filled Filled meas vert horiz height width a)
-> ArrayMatrix
Unpacked Arbitrary Filled Filled meas vert0 horiz0 height width a
-> UnpackedMatrix
Arbitrary Filled Filled meas vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> ArrayMatrix
Unpacked Arbitrary Filled Filled meas vert0 horiz0 height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a
instance
(Matrix.MultiplySame typ, Extent.Measure meas) =>
Matrix.MultiplySame (MapExtent typ meas) where
type (MapExtent typ meas) extra =
(Matrix.MultiplySameExtra typ (MapExtentExtra extra))
multiplySame :: matrix -> matrix -> matrix
multiplySame (MapExtent m a) (MapExtent _ b) =
Map meas vert0 horiz0 meas vert horiz sh sh
-> Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
sh
sh
a
forall vert0 horiz0 meas0 meas1 vert1 horiz1 height width typ xl xu
lower upper a.
(C vert0, C horiz0) =>
Map meas0 vert0 horiz0 meas1 vert1 horiz1 height width
-> Matrix typ xl xu lower upper meas0 vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas0)
(xl, vert0)
(xu, horiz0)
lower
upper
meas1
vert1
horiz1
height
width
a
MapExtent Map meas vert0 horiz0 meas vert horiz sh sh
m (Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
sh
sh
a)
-> Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
sh
sh
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
-> Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
-> Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
MultiplySameExtra typ xl, MultiplySameExtra typ xu,
PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
a Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
Matrix typ xl xu lower upper meas vert0 horiz0 sh sh a
b
instance
(MatrixClass.Complex typ, Extent.Measure meas) =>
MatrixClass.Complex (MapExtent typ meas) where
conjugate :: matrix a -> matrix a
conjugate (MapExtent m a) = Map meas vert0 horiz0 meas vert horiz height width
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
a
forall vert0 horiz0 meas0 meas1 vert1 horiz1 height width typ xl xu
lower upper a.
(C vert0, C horiz0) =>
Map meas0 vert0 horiz0 meas1 vert1 horiz1 height width
-> Matrix typ xl xu lower upper meas0 vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas0)
(xl, vert0)
(xu, horiz0)
lower
upper
meas1
vert1
horiz1
height
width
a
MapExtent Map meas vert0 horiz0 meas vert horiz height width
m (Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
a)
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix a -> matrix a
MatrixClass.conjugate Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a
fromReal :: matrix (RealOf a) -> matrix a
fromReal (MapExtent m a) = Map meas vert0 horiz0 meas vert horiz height width
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
a
forall vert0 horiz0 meas0 meas1 vert1 horiz1 height width typ xl xu
lower upper a.
(C vert0, C horiz0) =>
Map meas0 vert0 horiz0 meas1 vert1 horiz1 height width
-> Matrix typ xl xu lower upper meas0 vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas0)
(xl, vert0)
(xu, horiz0)
lower
upper
meas1
vert1
horiz1
height
width
a
MapExtent Map meas vert0 horiz0 meas vert horiz height width
m (Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
a)
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
a
forall a b. (a -> b) -> a -> b
$ Matrix
typ xl xu lower upper meas vert0 horiz0 height width (RealOf a)
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix (RealOf a) -> matrix a
MatrixClass.fromReal Matrix
typ xl xu lower upper meas vert0 horiz0 height width (RealOf a)
a
toComplex :: matrix a -> matrix (ComplexOf a)
toComplex (MapExtent m a) = Map meas vert0 horiz0 meas vert horiz height width
-> Matrix
typ xl xu lower upper meas vert0 horiz0 height width (ComplexOf a)
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
(ComplexOf a)
forall vert0 horiz0 meas0 meas1 vert1 horiz1 height width typ xl xu
lower upper a.
(C vert0, C horiz0) =>
Map meas0 vert0 horiz0 meas1 vert1 horiz1 height width
-> Matrix typ xl xu lower upper meas0 vert0 horiz0 height width a
-> Matrix
(MapExtent typ meas0)
(xl, vert0)
(xu, horiz0)
lower
upper
meas1
vert1
horiz1
height
width
a
MapExtent Map meas vert0 horiz0 meas vert horiz height width
m (Matrix
typ xl xu lower upper meas vert0 horiz0 height width (ComplexOf a)
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
(ComplexOf a))
-> Matrix
typ xl xu lower upper meas vert0 horiz0 height width (ComplexOf a)
-> Matrix
(MapExtent typ meas)
(xl, vert0)
(xu, horiz0)
lower
upper
meas
vert
horiz
height
width
(ComplexOf a)
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Matrix
typ xl xu lower upper meas vert0 horiz0 height width (ComplexOf a)
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix a -> matrix (ComplexOf a)
MatrixClass.toComplex Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a
instance
(Multiply.MultiplyVector typ, Matrix.ToQuadratic typ, Extent.Measure meas) =>
Multiply.MultiplyVector (MapExtent typ meas) where
type (MapExtent typ meas) extra =
(Multiply.MultiplyVectorExtra typ (MapExtentExtra extra),
Matrix.BoxExtra typ (MapExtentExtra extra))
matrixVector :: Matrix
(MapExtent typ meas)
xl
xu
lower
upper
meas
vert
horiz
height
width
a
-> Vector width a -> Vector height a
matrixVector (MapExtent _ a) Vector width a
x = Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Vector width a -> Vector height a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a Vector width a
x
vectorMatrix :: Vector height a
-> Matrix
(MapExtent typ meas)
xl
xu
lower
upper
meas
vert
horiz
height
width
a
-> Vector width a
vectorMatrix Vector height a
x (MapExtent _ a) = Vector height a
-> Matrix typ xl xu lower upper meas vert0 horiz0 height width a
-> Vector width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Vector height a
x Matrix typ xl xu lower upper meas vert0 horiz0 height width a
a
data FillStrips typ
data instance
Matrix (FillStrips typ)
extraLower extraUpper lower upper meas vert horiz height width a
where
FillStrips ::
(Omni.Strip lower, Omni.Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a ->
Matrix (FillStrips typ) (xl,lower) (xu,upper)
Filled Filled meas vert horiz height width a
type family xl
type instance (xl,lower) = xl
type family FillStripsStrip xl
type instance FillStripsStrip (xl,lower) = lower
instance (Matrix.Box typ) => Matrix.Box (FillStrips typ) where
type (FillStrips typ) extra =
Matrix.BoxExtra typ (FillStripsExtra extra)
extent :: Matrix
(FillStrips typ) xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
extent (FillStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
Matrix.extent Matrix typ xl xu lower upper meas vert horiz height width a
m
instance (Matrix.Transpose typ) => Matrix.Transpose (FillStrips typ) where
type (FillStrips typ) extra =
Matrix.TransposeExtra typ (FillStripsExtra extra)
transpose :: Matrix
(FillStrips typ) xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ) xu xl upper lower meas horiz vert width height a
transpose (FillStrips a) = Matrix typ xu xl upper lower meas horiz vert width height a
-> Matrix
(FillStrips typ)
(xu, upper)
(xl, lower)
Filled
Filled
meas
horiz
vert
width
height
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xu xl upper lower meas horiz vert width height a
-> Matrix
(FillStrips typ)
(xu, upper)
(xl, lower)
Filled
Filled
meas
horiz
vert
width
height
a)
-> Matrix typ xu xl upper lower meas horiz vert width height a
-> Matrix
(FillStrips typ)
(xu, upper)
(xl, lower)
Filled
Filled
meas
horiz
vert
width
height
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ xl xu lower upper meas vert horiz height width a
a
instance (Matrix.Layout typ) => Matrix.Layout (FillStrips typ) where
type (FillStrips typ) extra =
Matrix.LayoutExtra typ (FillStripsExtra extra)
layout :: Matrix
(FillStrips typ) xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (FillStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
forall typ xl xu meas vert horiz height width a lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
Matrix.layout Matrix typ xl xu lower upper meas vert horiz height width a
m
instance (Matrix.Format typ) => Matrix.Format (FillStrips typ) where
type (FillStrips typ) extra =
Matrix.FormatExtra typ (FillStripsExtra extra)
format :: Config
-> Matrix
(FillStrips typ) xl xu lower upper meas vert horiz height width a
-> out
format Config
fmt (FillStrips a) = Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Format typ, FormatExtra typ xl, FormatExtra typ xu, Measure meas,
C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.format Config
fmt Matrix typ xl xu lower upper meas vert horiz height width a
a
instance (Matrix.ToQuadratic typ) => Matrix.ToQuadratic (FillStrips typ) where
heightToQuadratic :: QuadraticMeas
(FillStrips typ) xl xu lower upper meas height width a
-> Quadratic (FillStrips typ) xl xu lower upper height a
heightToQuadratic (FillStrips m) = Matrix typ xl xu lower upper Shape Small Small height height a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
height
height
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper Shape Small Small height height a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
height
height
a)
-> Matrix typ xl xu lower upper Shape Small Small height height a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
height
height
a
forall a b. (a -> b) -> a -> b
$ QuadraticMeas typ xl xu lower upper meas height width a
-> Matrix typ xl xu lower upper Shape Small Small height height a
forall typ meas xl xu lower upper height width a.
(ToQuadratic typ, Measure meas) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> Quadratic typ xl xu lower upper height a
Matrix.heightToQuadratic QuadraticMeas typ xl xu lower upper meas height width a
m
widthToQuadratic :: QuadraticMeas
(FillStrips typ) xl xu lower upper meas height width a
-> Quadratic (FillStrips typ) xl xu lower upper width a
widthToQuadratic (FillStrips m) = Matrix typ xl xu lower upper Shape Small Small width width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
width
width
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper Shape Small Small width width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
width
width
a)
-> Matrix typ xl xu lower upper Shape Small Small width width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
width
width
a
forall a b. (a -> b) -> a -> b
$ QuadraticMeas typ xl xu lower upper meas height width a
-> Matrix typ xl xu lower upper Shape Small Small width width a
forall typ meas xl xu lower upper height width a.
(ToQuadratic typ, Measure meas) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> Quadratic typ xl xu lower upper width a
Matrix.widthToQuadratic QuadraticMeas typ xl xu lower upper meas height width a
m
instance
(MatrixClass.Unpack typ) =>
MatrixClass.Unpack (FillStrips typ) where
type (FillStrips typ) extra =
MatrixClass.UnpackExtra typ (FillStripsExtra extra)
unpack :: Matrix
(FillStrips typ) xl xu lower upper meas vert horiz height width a
-> ArrayMatrix
Unpacked Arbitrary lower upper meas vert horiz height width a
unpack (FillStrips m) = Unpacked Arbitrary lower upper meas vert horiz height width a
-> Unpacked Arbitrary Filled Filled meas vert horiz height width a
forall property lower upper meas vert horiz height width a.
(Property property, Strip lower, Strip upper) =>
Unpacked property lower upper meas vert horiz height width a
-> Unpacked property Filled Filled meas vert horiz height width a
Unpacked.fillBoth (Unpacked Arbitrary lower upper meas vert horiz height width a
-> Unpacked Arbitrary Filled Filled meas vert horiz height width a)
-> Unpacked Arbitrary lower upper meas vert horiz height width a
-> Unpacked Arbitrary Filled Filled meas vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz height width a
-> Unpacked Arbitrary lower upper meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ArrayMatrix
Unpacked Arbitrary lower upper meas vert horiz height width a
MatrixClass.unpack Matrix typ xl xu lower upper meas vert horiz height width a
m
instance (MatrixClass.Complex typ) => MatrixClass.Complex (FillStrips typ) where
conjugate :: matrix a -> matrix a
conjugate (FillStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a)
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix a -> matrix a
MatrixClass.conjugate Matrix typ xl xu lower upper meas vert horiz height width a
m
fromReal :: matrix (RealOf a) -> matrix a
fromReal (FillStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a)
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
forall a b. (a -> b) -> a -> b
$ Matrix
typ xl xu lower upper meas vert horiz height width (RealOf a)
-> Matrix typ xl xu lower upper meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix (RealOf a) -> matrix a
MatrixClass.fromReal Matrix
typ xl xu lower upper meas vert horiz height width (RealOf a)
m
toComplex :: matrix a -> matrix (ComplexOf a)
toComplex (FillStrips m) = Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
(ComplexOf a)
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
(ComplexOf a))
-> Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
(ComplexOf a)
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix a -> matrix (ComplexOf a)
MatrixClass.toComplex Matrix typ xl xu lower upper meas vert horiz height width a
m
instance (Matrix.MultiplySame typ) => Matrix.MultiplySame (FillStrips typ) where
type (FillStrips typ) extra =
(Matrix.MultiplySameExtra typ (FillStripsExtra extra),
MatrixShape.PowerStrip (FillStripsStrip extra))
multiplySame :: matrix -> matrix -> matrix
multiplySame (FillStrips a) (FillStrips b) =
Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
sh
sh
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
sh
sh
a)
-> Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
sh
sh
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix typ xl xu lower upper meas vert horiz sh sh a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
MultiplySameExtra typ xl, MultiplySameExtra typ xu,
PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Matrix typ xl xu lower upper meas vert horiz sh sh a
a Matrix typ xl xu lower upper meas vert horiz sh sh a
Matrix typ xl xu lower upper meas vert horiz sh sh a
b
instance
(Multiply.MultiplyVector typ, Matrix.ToQuadratic typ) =>
Multiply.MultiplyVector (FillStrips typ) where
type (FillStrips typ) extra =
(Multiply.MultiplyVectorExtra typ (FillStripsExtra extra),
Matrix.BoxExtra typ (FillStripsExtra extra),
Omni.Strip (FillStripsStrip extra))
matrixVector :: Matrix
(FillStrips typ) xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
matrixVector (FillStrips a) Vector width a
x = Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ xl xu lower upper meas vert horiz height width a
a Vector width a
x
vectorMatrix :: Vector height a
-> Matrix
(FillStrips typ) xl xu lower upper meas vert horiz height width a
-> Vector width a
vectorMatrix Vector height a
x (FillStrips a) = Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Vector height a
x Matrix typ xl xu lower upper meas vert horiz height width a
a
instance
(Multiply.MultiplySquare typ, Matrix.ToQuadratic typ) =>
Multiply.MultiplySquare (FillStrips typ) where
type (FillStrips typ) extra =
(Multiply.MultiplySquareExtra typ (FillStripsExtra extra),
Matrix.BoxExtra typ (FillStripsExtra extra),
Omni.Strip (FillStripsStrip extra))
transposableSquare :: Transposition
-> Quadratic (FillStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
transposableSquare Transposition
trans (FillStrips a) = Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, Eq height, C width, Floating a) =>
Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.transposableSquare Transposition
trans Quadratic typ xl xu lower upper height a
a
squareFull :: Quadratic (FillStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
squareFull (FillStrips a) Full meas vert horiz height width a
b = Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ xl xu lower upper height a
a Full meas vert horiz height width a
b
fullSquare :: Full meas vert horiz height width a
-> Quadratic (FillStrips typ) xl xu lower upper width a
-> Full meas vert horiz height width a
fullSquare Full meas vert horiz height width a
b (FillStrips a) = Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Full meas vert horiz height width a
b Quadratic typ xl xu lower upper width a
a
instance (Multiply.Power typ) => Multiply.Power (FillStrips typ) where
type (FillStrips typ) extra =
(Multiply.PowerExtra typ (FillStripsExtra extra),
MatrixShape.PowerStrip (FillStripsStrip extra))
square :: Quadratic (FillStrips typ) xl xu lower upper sh a
-> Quadratic (FillStrips typ) xl xu lower upper sh a
square (FillStrips a) = Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a)
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.square Matrix typ xl xu lower upper Shape Small Small sh sh a
a
power :: Integer
-> Quadratic (FillStrips typ) xl xu lower upper sh a
-> Quadratic (FillStrips typ) xl xu lower upper sh a
power Integer
n (FillStrips a) = Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a)
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a
forall a b. (a -> b) -> a -> b
$ Integer
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
PowerStrip upper, C sh, Floating a) =>
Integer
-> Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.power Integer
n Matrix typ xl xu lower upper Shape Small Small sh sh a
a
powers1 :: Quadratic (FillStrips typ) xl xu lower upper sh a
-> Stream (Quadratic (FillStrips typ) xl xu lower upper sh a)
powers1 (FillStrips a) = (Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a)
-> Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
-> Stream
(Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
-> Stream
(Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a))
-> Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
-> Stream
(Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
Shape
Small
Small
sh
sh
a)
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Stream (Quadratic typ xl xu lower upper sh a)
Multiply.powers1 Matrix typ xl xu lower upper Shape Small Small sh sh a
a
instance (Divide.Determinant typ) => Divide.Determinant (FillStrips typ) where
type (FillStrips typ) extra =
(Divide.DeterminantExtra typ (FillStripsExtra extra))
determinant :: Quadratic (FillStrips typ) xl xu lower upper sh a -> a
determinant (FillStrips a) = Quadratic typ xl xu lower upper sh a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
Divide.determinant Quadratic typ xl xu lower upper sh a
a
instance
(Divide.Solve typ, Matrix.ToQuadratic typ) =>
Divide.Solve (FillStrips typ) where
type (FillStrips typ) extra =
(Divide.SolveExtra typ (FillStripsExtra extra))
solve :: Transposition
-> Quadratic (FillStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solve Transposition
trans (FillStrips a) = Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Eq height, Floating a) =>
Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solve Transposition
trans Quadratic typ xl xu lower upper height a
a
solveRight :: Quadratic (FillStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solveRight (FillStrips a) Full meas vert horiz height width a
b = Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ xl xu lower upper height a
a Full meas vert horiz height width a
b
solveLeft :: Full meas vert horiz height width a
-> Quadratic (FillStrips typ) xl xu lower upper width a
-> Full meas vert horiz height width a
solveLeft Full meas vert horiz height width a
b (FillStrips a) = Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Full meas vert horiz height width a
b Quadratic typ xl xu lower upper width a
a
instance
(Divide.Inverse typ, Matrix.ToQuadratic typ) =>
Divide.Inverse (FillStrips typ) where
type (FillStrips typ) extra =
(Divide.InverseExtra typ (FillStripsExtra extra),
MatrixShape.PowerStrip (FillStripsStrip extra))
inverse :: QuadraticMeas
(FillStrips typ) xl xu lower upper meas height width a
-> QuadraticMeas
(FillStrips typ) xl xu lower upper meas width height a
inverse (FillStrips a) = Matrix typ xl xu lower upper meas Small Small width height a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
Small
Small
width
height
a
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
vert
horiz
height
width
a
FillStrips (Matrix typ xl xu lower upper meas Small Small width height a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
Small
Small
width
height
a)
-> Matrix typ xl xu lower upper meas Small Small width height a
-> Matrix
(FillStrips typ)
(xl, lower)
(xu, upper)
Filled
Filled
meas
Small
Small
width
height
a
forall a b. (a -> b) -> a -> b
$ QuadraticMeas typ xl xu lower upper meas height width a
-> Matrix typ xl xu lower upper meas Small Small width height a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
PowerStrip lower, PowerStrip upper, Measure meas, C height,
C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse QuadraticMeas typ xl xu lower upper meas height width a
a
data PowerStrips typ
data instance
Matrix (PowerStrips typ)
extraLower extraUpper lowerf upperf meas vert horiz height width a
where
PowerStrips ::
(Omni.Strip lower, Fill lower ~ lowerf, Omni.PowerStrip lowerf,
Omni.Strip upper, Fill upper ~ upperf, Omni.PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a ->
Matrix (PowerStrips typ) (xl,lower) (xu,upper)
lowerf upperf meas vert horiz height width a
powerStrips ::
(Omni.Strip lower, Omni.Strip upper) =>
Matrix.QuadraticMeas typ xl xu lower upper meas height width a ->
Matrix.QuadraticMeas (PowerStrips typ) (xl,lower) (xu,upper)
(Fill lower) (Fill upper) meas height width a
powerStrips :: QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas
(PowerStrips typ)
(xl, lower)
(xu, upper)
(Fill lower)
(Fill upper)
meas
height
width
a
powerStrips QuadraticMeas typ xl xu lower upper meas height width a
a =
case (StripSingleton lower -> PowerStripFact (Fill lower),
StripSingleton upper -> PowerStripFact (Fill upper))
-> (StripSingleton lower, StripSingleton upper)
-> (PowerStripFact (Fill lower), PowerStripFact (Fill upper))
forall a c b d. (a -> c, b -> d) -> (a, b) -> (c, d)
mapPair (StripSingleton lower -> PowerStripFact (Fill lower)
forall c. Strip c => StripSingleton c -> PowerStripFact (Fill c)
filledPowerStripFact, StripSingleton upper -> PowerStripFact (Fill upper)
forall c. Strip c => StripSingleton c -> PowerStripFact (Fill c)
filledPowerStripFact) ((StripSingleton lower, StripSingleton upper)
-> (PowerStripFact (Fill lower), PowerStripFact (Fill upper)))
-> (StripSingleton lower, StripSingleton upper)
-> (PowerStripFact (Fill lower), PowerStripFact (Fill upper))
forall a b. (a -> b) -> a -> b
$
QuadraticMeas typ xl xu lower upper meas height width a
-> (StripSingleton lower, StripSingleton upper)
forall lower upper typ xl xu meas vert horiz height width a.
(Strip lower, Strip upper) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> (StripSingleton lower, StripSingleton upper)
Matrix.strips QuadraticMeas typ xl xu lower upper meas height width a
a of
(PowerStripFact (Fill lower)
PowerStripFact, PowerStripFact (Fill upper)
PowerStripFact) -> QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas
(PowerStrips typ)
(xl, lower)
(xu, upper)
(Fill lower)
(Fill upper)
meas
height
width
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips QuadraticMeas typ xl xu lower upper meas height width a
a
type family Fill offDiag
type instance Fill (Layout.Bands Unary.Zero) = Layout.Bands Unary.Zero
type instance Fill (Layout.Bands (Unary.Succ k)) = Layout.Filled
type instance Fill Layout.Filled = Layout.Filled
type family xl
type instance (xl,lower) = xl
type family PowerStripsStrip xl
type instance PowerStripsStrip (xl,lower) = lower
data PowerStripFact c = (Omni.PowerStrip c) => PowerStripFact
filledPowerStripFact ::
(Omni.Strip c) => Omni.StripSingleton c -> PowerStripFact (Fill c)
filledPowerStripFact :: StripSingleton c -> PowerStripFact (Fill c)
filledPowerStripFact StripSingleton c
w =
case StripSingleton c
w of
StripSingleton c
Omni.StripFilled -> PowerStripFact (Fill c)
forall c. PowerStrip c => PowerStripFact c
PowerStripFact
Omni.StripBands HeadSingleton offDiag
Unary.Zero -> PowerStripFact (Fill c)
forall c. PowerStrip c => PowerStripFact c
PowerStripFact
Omni.StripBands HeadSingleton offDiag
Unary.Succ -> PowerStripFact (Fill c)
forall c. PowerStrip c => PowerStripFact c
PowerStripFact
instance (Matrix.Box typ) => Matrix.Box (PowerStrips typ) where
type (PowerStrips typ) extra =
Matrix.BoxExtra typ (PowerStripsExtra extra)
extent :: Matrix
(PowerStrips typ) xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
extent (PowerStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
Matrix.extent Matrix typ xl xu lower upper meas vert horiz height width a
m
instance (Matrix.Transpose typ) => Matrix.Transpose (PowerStrips typ) where
type (PowerStrips typ) extra =
Matrix.TransposeExtra typ (PowerStripsExtra extra)
transpose :: Matrix
(PowerStrips typ) xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ) xu xl upper lower meas horiz vert width height a
transpose (PowerStrips a) = Matrix typ xu xl upper lower meas horiz vert width height a
-> Matrix
(PowerStrips typ)
(xu, upper)
(xl, lower)
upper
lower
meas
horiz
vert
width
height
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xu xl upper lower meas horiz vert width height a
-> Matrix
(PowerStrips typ)
(xu, upper)
(xl, lower)
upper
lower
meas
horiz
vert
width
height
a)
-> Matrix typ xu xl upper lower meas horiz vert width height a
-> Matrix
(PowerStrips typ)
(xu, upper)
(xl, lower)
upper
lower
meas
horiz
vert
width
height
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ xl xu lower upper meas vert horiz height width a
a
instance (Matrix.Layout typ) => Matrix.Layout (PowerStrips typ) where
type (PowerStrips typ) extra =
Matrix.LayoutExtra typ (PowerStripsExtra extra)
layout :: Matrix
(PowerStrips typ) xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (PowerStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
forall typ xl xu meas vert horiz height width a lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
Matrix.layout Matrix typ xl xu lower upper meas vert horiz height width a
m
instance (Matrix.Format typ) => Matrix.Format (PowerStrips typ) where
type (PowerStrips typ) extra =
Matrix.FormatExtra typ (PowerStripsExtra extra)
format :: Config
-> Matrix
(PowerStrips typ) xl xu lower upper meas vert horiz height width a
-> out
format Config
fmt (PowerStrips a) = Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Format typ, FormatExtra typ xl, FormatExtra typ xu, Measure meas,
C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.format Config
fmt Matrix typ xl xu lower upper meas vert horiz height width a
a
instance
(Matrix.MultiplySame typ) => Matrix.MultiplySame (PowerStrips typ) where
type (PowerStrips typ) extra =
(Matrix.MultiplySameExtra typ (PowerStripsExtra extra),
MatrixShape.PowerStrip (PowerStripsStrip extra))
multiplySame :: matrix -> matrix -> matrix
multiplySame (PowerStrips a) (PowerStrips b) =
Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
sh
sh
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
sh
sh
a)
-> Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
sh
sh
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix typ xl xu lower upper meas vert horiz sh sh a
-> Matrix typ xl xu lower upper meas vert horiz sh sh a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
MultiplySameExtra typ xl, MultiplySameExtra typ xu,
PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Matrix typ xl xu lower upper meas vert horiz sh sh a
a Matrix typ xl xu lower upper meas vert horiz sh sh a
Matrix typ xl xu lower upper meas vert horiz sh sh a
b
instance (Matrix.ToQuadratic typ) => Matrix.ToQuadratic (PowerStrips typ) where
heightToQuadratic :: QuadraticMeas
(PowerStrips typ) xl xu lower upper meas height width a
-> Quadratic (PowerStrips typ) xl xu lower upper height a
heightToQuadratic (PowerStrips m) = Matrix typ xl xu lower upper Shape Small Small height height a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
height
height
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper Shape Small Small height height a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
height
height
a)
-> Matrix typ xl xu lower upper Shape Small Small height height a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
height
height
a
forall a b. (a -> b) -> a -> b
$ QuadraticMeas typ xl xu lower upper meas height width a
-> Matrix typ xl xu lower upper Shape Small Small height height a
forall typ meas xl xu lower upper height width a.
(ToQuadratic typ, Measure meas) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> Quadratic typ xl xu lower upper height a
Matrix.heightToQuadratic QuadraticMeas typ xl xu lower upper meas height width a
m
widthToQuadratic :: QuadraticMeas
(PowerStrips typ) xl xu lower upper meas height width a
-> Quadratic (PowerStrips typ) xl xu lower upper width a
widthToQuadratic (PowerStrips m) = Matrix typ xl xu lower upper Shape Small Small width width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
width
width
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper Shape Small Small width width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
width
width
a)
-> Matrix typ xl xu lower upper Shape Small Small width width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
width
width
a
forall a b. (a -> b) -> a -> b
$ QuadraticMeas typ xl xu lower upper meas height width a
-> Matrix typ xl xu lower upper Shape Small Small width width a
forall typ meas xl xu lower upper height width a.
(ToQuadratic typ, Measure meas) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> Quadratic typ xl xu lower upper width a
Matrix.widthToQuadratic QuadraticMeas typ xl xu lower upper meas height width a
m
instance
(MatrixClass.Complex typ) =>
MatrixClass.Complex (PowerStrips typ) where
conjugate :: matrix a -> matrix a
conjugate (PowerStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
a)
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix a -> matrix a
MatrixClass.conjugate Matrix typ xl xu lower upper meas vert horiz height width a
m
fromReal :: matrix (RealOf a) -> matrix a
fromReal (PowerStrips m) = Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
a)
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
a
forall a b. (a -> b) -> a -> b
$ Matrix
typ xl xu lower upper meas vert horiz height width (RealOf a)
-> Matrix typ xl xu lower upper meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix (RealOf a) -> matrix a
MatrixClass.fromReal Matrix
typ xl xu lower upper meas vert horiz height width (RealOf a)
m
toComplex :: matrix a -> matrix (ComplexOf a)
toComplex (PowerStrips m) = Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
(ComplexOf a)
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
(ComplexOf a))
-> Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
vert
horiz
height
width
(ComplexOf a)
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
typ xl xu lower upper meas vert horiz height width (ComplexOf a)
forall typ xl xu lower upper meas vert horiz height width
(matrix :: * -> *) a.
(Complex typ,
Matrix typ xl xu lower upper meas vert horiz height width ~ matrix,
Measure meas, C vert, C horiz, C height, C width, Floating a) =>
matrix a -> matrix (ComplexOf a)
MatrixClass.toComplex Matrix typ xl xu lower upper meas vert horiz height width a
m
instance
(Multiply.MultiplyVector typ, Matrix.ToQuadratic typ) =>
Multiply.MultiplyVector (PowerStrips typ) where
type (PowerStrips typ) extra =
(Multiply.MultiplyVectorExtra typ (PowerStripsExtra extra),
Divide.SolveExtra typ (PowerStripsExtra extra),
Matrix.BoxExtra typ (PowerStripsExtra extra),
Omni.Strip (PowerStripsStrip extra))
matrixVector :: Matrix
(PowerStrips typ) xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
matrixVector (PowerStrips a) Vector width a
x = Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ xl xu lower upper meas vert horiz height width a
a Vector width a
x
vectorMatrix :: Vector height a
-> Matrix
(PowerStrips typ) xl xu lower upper meas vert horiz height width a
-> Vector width a
vectorMatrix Vector height a
x (PowerStrips a) = Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Vector height a
x Matrix typ xl xu lower upper meas vert horiz height width a
a
instance
(Multiply.MultiplySquare typ, Matrix.ToQuadratic typ) =>
Multiply.MultiplySquare (PowerStrips typ) where
type (PowerStrips typ) extra =
(Multiply.MultiplySquareExtra typ (PowerStripsExtra extra),
Divide.SolveExtra typ (PowerStripsExtra extra),
Matrix.BoxExtra typ (PowerStripsExtra extra),
Omni.Strip (PowerStripsStrip extra))
transposableSquare :: Transposition
-> Quadratic (PowerStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
transposableSquare Transposition
trans (PowerStrips a) =
Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, Eq height, C width, Floating a) =>
Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.transposableSquare Transposition
trans Quadratic typ xl xu lower upper height a
a
squareFull :: Quadratic (PowerStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
squareFull (PowerStrips a) Full meas vert horiz height width a
b = Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ xl xu lower upper height a
a Full meas vert horiz height width a
b
fullSquare :: Full meas vert horiz height width a
-> Quadratic (PowerStrips typ) xl xu lower upper width a
-> Full meas vert horiz height width a
fullSquare Full meas vert horiz height width a
b (PowerStrips a) = Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Full meas vert horiz height width a
b Quadratic typ xl xu lower upper width a
a
instance (Multiply.Power typ) => Multiply.Power (PowerStrips typ) where
type (PowerStrips typ) extra =
(Multiply.PowerExtra typ (PowerStripsExtra extra),
MatrixShape.PowerStrip (PowerStripsStrip extra))
square :: Quadratic (PowerStrips typ) xl xu lower upper sh a
-> Quadratic (PowerStrips typ) xl xu lower upper sh a
square (PowerStrips a) = Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a)
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.square Matrix typ xl xu lower upper Shape Small Small sh sh a
a
power :: Integer
-> Quadratic (PowerStrips typ) xl xu lower upper sh a
-> Quadratic (PowerStrips typ) xl xu lower upper sh a
power Integer
n (PowerStrips a) = Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a)
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a
forall a b. (a -> b) -> a -> b
$ Integer
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix typ xl xu lower upper Shape Small Small sh sh a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
PowerStrip upper, C sh, Floating a) =>
Integer
-> Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.power Integer
n Matrix typ xl xu lower upper Shape Small Small sh sh a
a
powers1 :: Quadratic (PowerStrips typ) xl xu lower upper sh a
-> Stream (Quadratic (PowerStrips typ) xl xu lower upper sh a)
powers1 (PowerStrips a) = (Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a)
-> Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
-> Stream
(Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
-> Stream
(Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a))
-> Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
-> Stream
(Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
Shape
Small
Small
sh
sh
a)
forall a b. (a -> b) -> a -> b
$ Matrix typ xl xu lower upper Shape Small Small sh sh a
-> Stream (Matrix typ xl xu lower upper Shape Small Small sh sh a)
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Stream (Quadratic typ xl xu lower upper sh a)
Multiply.powers1 Matrix typ xl xu lower upper Shape Small Small sh sh a
a
instance (Divide.Determinant typ) => Divide.Determinant (PowerStrips typ) where
type (PowerStrips typ) extra =
(Divide.DeterminantExtra typ (PowerStripsExtra extra))
determinant :: Quadratic (PowerStrips typ) xl xu lower upper sh a -> a
determinant (PowerStrips a) = Quadratic typ xl xu lower upper sh a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
Divide.determinant Quadratic typ xl xu lower upper sh a
a
instance
(Divide.Solve typ, Matrix.ToQuadratic typ) =>
Divide.Solve (PowerStrips typ) where
type (PowerStrips typ) extra =
(Divide.SolveExtra typ (PowerStripsExtra extra))
solve :: Transposition
-> Quadratic (PowerStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solve Transposition
trans (PowerStrips a) = Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Eq height, Floating a) =>
Transposition
-> Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solve Transposition
trans Quadratic typ xl xu lower upper height a
a
solveRight :: Quadratic (PowerStrips typ) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solveRight (PowerStrips a) Full meas vert horiz height width a
b = Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ xl xu lower upper height a
a Full meas vert horiz height width a
b
solveLeft :: Full meas vert horiz height width a
-> Quadratic (PowerStrips typ) xl xu lower upper width a
-> Full meas vert horiz height width a
solveLeft Full meas vert horiz height width a
b (PowerStrips a) = Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
Strip upper, Measure meas, C vert, C horiz, C height, C width,
Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Full meas vert horiz height width a
b Quadratic typ xl xu lower upper width a
a
instance
(Divide.Inverse typ, Matrix.ToQuadratic typ) =>
Divide.Inverse (PowerStrips typ) where
type (PowerStrips typ) extra =
(Divide.InverseExtra typ (PowerStripsExtra extra),
MatrixShape.PowerStrip (PowerStripsStrip extra))
inverse :: QuadraticMeas
(PowerStrips typ) xl xu lower upper meas height width a
-> QuadraticMeas
(PowerStrips typ) xl xu lower upper meas width height a
inverse (PowerStrips a) = Matrix typ xl xu lower upper meas Small Small width height a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
Small
Small
width
height
a
forall lower lowerf upper upperf typ xl xu meas vert horiz height
width a.
(Strip lower, Fill lower ~ lowerf, PowerStrip lowerf, Strip upper,
Fill upper ~ upperf, PowerStrip upperf) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lowerf
upperf
meas
vert
horiz
height
width
a
PowerStrips (Matrix typ xl xu lower upper meas Small Small width height a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
Small
Small
width
height
a)
-> Matrix typ xl xu lower upper meas Small Small width height a
-> Matrix
(PowerStrips typ)
(xl, lower)
(xu, upper)
lower
upper
meas
Small
Small
width
height
a
forall a b. (a -> b) -> a -> b
$ QuadraticMeas typ xl xu lower upper meas height width a
-> Matrix typ xl xu lower upper meas Small Small width height a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
PowerStrip lower, PowerStrip upper, Measure meas, C height,
C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse QuadraticMeas typ xl xu lower upper meas height width a
a