{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE UndecidableInstances #-}
module Numeric.LAPACK.Matrix.Plain.Divide where

import qualified Numeric.LAPACK.Matrix.Plain.Multiply as Multiply

import qualified Numeric.LAPACK.Matrix.Square.Linear
                                           as Square
import qualified Numeric.LAPACK.Matrix.Square.Basic
                                           as Square
import qualified Numeric.LAPACK.Matrix.Triangular.Linear
                                           as Triangular
import qualified Numeric.LAPACK.Matrix.Triangular.Basic
                                           as Triangular
import qualified Numeric.LAPACK.Matrix.Hermitian.Linear
                                           as Hermitian
import qualified Numeric.LAPACK.Matrix.Banded.Linear
                                           as Banded
import qualified Numeric.LAPACK.Matrix.Banded.Basic
                                           as Banded
import qualified Numeric.LAPACK.Matrix.BandedHermitianPositiveDefinite.Linear
                                           as BandedHermitianPositiveDefinite

import qualified Numeric.LAPACK.Matrix.Plain.Class as Plain
import qualified Numeric.LAPACK.Matrix.Basic as Basic
import qualified Numeric.LAPACK.Matrix.Shape.Private as MatrixShape
import qualified Numeric.LAPACK.Matrix.Shape.Box as Box
import qualified Numeric.LAPACK.Matrix.Extent.Private as Extent
import qualified Numeric.LAPACK.Vector as Vector
import qualified Numeric.LAPACK.Scalar as Scalar
import Numeric.LAPACK.Matrix.Extent.Private (Small)
import Numeric.LAPACK.Matrix.Basic (swapMultiply)
import Numeric.LAPACK.Matrix.Modifier (Transposition(Transposed, NonTransposed))
import Numeric.LAPACK.Matrix.Private (Full)
import Numeric.LAPACK.Vector (Vector)

import qualified Numeric.Netlib.Class as Class

import qualified Type.Data.Num.Unary as Unary

import qualified Data.Array.Comfort.Shape as Shape
import Data.Array.Comfort.Storable (Array)


class (Plain.SquareShape shape) => Determinant shape where
   determinant :: (Class.Floating a) => Array shape a -> a

class (Plain.SquareShape shape) => Solve shape where
   {-# MINIMAL solve | solveLeft,solveRight #-}
   solve ::
      (Class.Floating a, Box.HeightOf shape ~ height, Eq height,
       Extent.C vert, Extent.C horiz, Shape.C width) =>
      Transposition -> Array shape a ->
      Full vert horiz height width a -> Full vert horiz height width a
   solve Transposition
NonTransposed Array shape a
a Full vert horiz height width a
b = Array shape a
-> Full vert horiz height width a -> Full vert horiz height width a
forall shape a height vert horiz width.
(Solve shape, Floating a, HeightOf shape ~ height, Eq height,
 C vert, C horiz, C width) =>
Array shape a
-> Full vert horiz height width a -> Full vert horiz height width a
solveRight Array shape a
a Full vert horiz height width a
b
   solve Transposition
Transposed Array shape a
a Full vert horiz height width a
b = Full horiz vert width height a -> Full vert horiz height width a
forall vert horiz height width a.
(C vert, C horiz) =>
Full vert horiz height width a -> Full horiz vert width height a
Basic.transpose (Full horiz vert width height a -> Full vert horiz height width a)
-> Full horiz vert width height a -> Full vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Full horiz vert width height a
-> Array shape a -> Full horiz vert width height a
forall shape a width vert horiz height.
(Solve shape, Floating a, HeightOf shape ~ width, Eq width, C vert,
 C horiz, C height) =>
Full vert horiz height width a
-> Array shape a -> Full vert horiz height width a
solveLeft (Full vert horiz height width a -> Full horiz vert width height a
forall vert horiz height width a.
(C vert, C horiz) =>
Full vert horiz height width a -> Full horiz vert width height a
Basic.transpose Full vert horiz height width a
b) Array shape a
a

   solveRight ::
      (Class.Floating a, Box.HeightOf shape ~ height, Eq height,
       Extent.C vert, Extent.C horiz, Shape.C width) =>
      Array shape a ->
      Full vert horiz height width a -> Full vert horiz height width a
   solveRight = Transposition
-> Array shape a
-> Full vert horiz height width a
-> Full vert horiz height width a
forall shape a height vert horiz width.
(Solve shape, Floating a, HeightOf shape ~ height, Eq height,
 C vert, C horiz, C width) =>
Transposition
-> Array shape a
-> Full vert horiz height width a
-> Full vert horiz height width a
solve Transposition
NonTransposed

   solveLeft ::
      (Class.Floating a, Box.HeightOf shape ~ width, Eq width,
       Extent.C vert, Extent.C horiz, Shape.C height) =>
      Full vert horiz height width a ->
      Array shape a ->
      Full vert horiz height width a
   solveLeft = (Array shape a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Array shape a
-> Full vert horiz height width a
forall vertA vertB horizA horizB matrix widthA heightA a widthB
       heightB.
(C vertA, C vertB, C horizA, C horizB) =>
(matrix
 -> Full horizA vertA widthA heightA a
 -> Full horizB vertB widthB heightB a)
-> Full vertA horizA heightA widthA a
-> matrix
-> Full vertB horizB heightB widthB a
swapMultiply ((Array shape a
  -> Full horiz vert width height a
  -> Full horiz vert width height a)
 -> Full vert horiz height width a
 -> Array shape a
 -> Full vert horiz height width a)
-> (Array shape a
    -> Full horiz vert width height a
    -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Array shape a
-> Full vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Transposition
-> Array shape a
-> Full horiz vert width height a
-> Full horiz vert width height a
forall shape a height vert horiz width.
(Solve shape, Floating a, HeightOf shape ~ height, Eq height,
 C vert, C horiz, C width) =>
Transposition
-> Array shape a
-> Full vert horiz height width a
-> Full vert horiz height width a
solve Transposition
Transposed

class (Solve shape, Multiply.Power shape) => Inverse shape where
   inverse :: (Class.Floating a) => Array shape a -> Array shape a

solveVector ::
   (Solve shape, Box.HeightOf shape ~ height, Eq height, Class.Floating a) =>
   Transposition -> Array shape a -> Vector height a -> Vector height a
solveVector :: Transposition
-> Array shape a -> Vector height a -> Vector height a
solveVector Transposition
trans = Order
-> (General height () a -> General height () a)
-> Vector height a
-> Vector height a
forall height0 a height1 b.
Order
-> (General height0 () a -> General height1 () b)
-> Vector height0 a
-> Vector height1 b
Basic.unliftColumn Order
MatrixShape.ColumnMajor ((General height () a -> General height () a)
 -> Vector height a -> Vector height a)
-> (Array shape a -> General height () a -> General height () a)
-> Array shape a
-> Vector height a
-> Vector height a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Transposition
-> Array shape a -> General height () a -> General height () a
forall shape a height vert horiz width.
(Solve shape, Floating a, HeightOf shape ~ height, Eq height,
 C vert, C horiz, C width) =>
Transposition
-> Array shape a
-> Full vert horiz height width a
-> Full vert horiz height width a
solve Transposition
trans


instance
   (vert ~ Small, horiz ~ Small, Shape.C height, height ~ width) =>
      Determinant (MatrixShape.Full vert horiz height width) where
   determinant :: Array (Full vert horiz height width) a -> a
determinant = Array (Full vert horiz height width) a -> a
forall sh a. (C sh, Floating a) => Square sh a -> a
Square.determinant

instance
   (vert ~ Small, horiz ~ Small, Shape.C height, height ~ width) =>
      Solve (MatrixShape.Full vert horiz height width) where
   solveRight :: Array (Full vert horiz height width) a
-> Full vert horiz height width a -> Full vert horiz height width a
solveRight = Array (Full vert horiz height width) a
-> Full vert horiz height width a -> Full vert horiz height width a
forall vert horiz sh nrhs a.
(C vert, C horiz, C sh, Eq sh, C nrhs, Floating a) =>
Square sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Square.solve
   solveLeft :: Full vert horiz height width a
-> Array (Full vert horiz height width) a
-> Full vert horiz height width a
solveLeft = (Square width a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Square width a
-> Full vert horiz height width a
forall vertA vertB horizA horizB matrix widthA heightA a widthB
       heightB.
(C vertA, C vertB, C horizA, C horizB) =>
(matrix
 -> Full horizA vertA widthA heightA a
 -> Full horizB vertB widthB heightB a)
-> Full vertA horizA heightA widthA a
-> matrix
-> Full vertB horizB heightB widthB a
swapMultiply ((Square width a
  -> Full horiz vert width height a
  -> Full horiz vert width height a)
 -> Full vert horiz height width a
 -> Square width a
 -> Full vert horiz height width a)
-> (Square width a
    -> Full horiz vert width height a
    -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Square width a
-> Full vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Square width a
-> Full horiz vert width height a -> Full horiz vert width height a
forall vert horiz sh nrhs a.
(C vert, C horiz, C sh, Eq sh, C nrhs, Floating a) =>
Square sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Square.solve (Square width a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> (Square width a -> Square width a)
-> Square width a
-> Full horiz vert width height a
-> Full horiz vert width height a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Square width a -> Square width a
forall sh a. Square sh a -> Square sh a
Square.transpose

instance
   (vert ~ Small, horiz ~ Small, Shape.C height, height ~ width) =>
      Inverse (MatrixShape.Full vert horiz height width) where
   inverse :: Array (Full vert horiz height width) a
-> Array (Full vert horiz height width) a
inverse = Array (Full vert horiz height width) a
-> Array (Full vert horiz height width) a
forall sh a. (C sh, Floating a) => Square sh a -> Square sh a
Square.inverse


instance (Shape.C shape) => Determinant (MatrixShape.Hermitian shape) where
   determinant :: Array (Hermitian shape) a -> a
determinant = RealOf a -> a
forall a. Floating a => RealOf a -> a
Scalar.fromReal (RealOf a -> a)
-> (Array (Hermitian shape) a -> RealOf a)
-> Array (Hermitian shape) a
-> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Array (Hermitian shape) a -> RealOf a
forall sh a. (C sh, Floating a) => Hermitian sh a -> RealOf a
Hermitian.determinant

instance (Shape.C shape) => Solve (MatrixShape.Hermitian shape) where
   solveRight :: Array (Hermitian shape) a
-> Full vert horiz height width a -> Full vert horiz height width a
solveRight = Array (Hermitian shape) a
-> Full vert horiz height width a -> Full vert horiz height width a
forall vert horiz sh nrhs a.
(C vert, C horiz, C sh, Eq sh, C nrhs, Floating a) =>
Hermitian sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Hermitian.solve
   solveLeft :: Full vert horiz height width a
-> Array (Hermitian shape) a -> Full vert horiz height width a
solveLeft = (Vector (Hermitian width) a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Vector (Hermitian width) a
-> Full vert horiz height width a
forall vertA vertB horizA horizB matrix widthA heightA a widthB
       heightB.
(C vertA, C vertB, C horizA, C horizB) =>
(matrix
 -> Full horizA vertA widthA heightA a
 -> Full horizB vertB widthB heightB a)
-> Full vertA horizA heightA widthA a
-> matrix
-> Full vertB horizB heightB widthB a
swapMultiply ((Vector (Hermitian width) a
  -> Full horiz vert width height a
  -> Full horiz vert width height a)
 -> Full vert horiz height width a
 -> Vector (Hermitian width) a
 -> Full vert horiz height width a)
-> (Vector (Hermitian width) a
    -> Full horiz vert width height a
    -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Vector (Hermitian width) a
-> Full vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Vector (Hermitian width) a
-> Full horiz vert width height a -> Full horiz vert width height a
forall vert horiz sh nrhs a.
(C vert, C horiz, C sh, Eq sh, C nrhs, Floating a) =>
Hermitian sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Hermitian.solve (Vector (Hermitian width) a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> (Vector (Hermitian width) a -> Vector (Hermitian width) a)
-> Vector (Hermitian width) a
-> Full horiz vert width height a
-> Full horiz vert width height a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector (Hermitian width) a -> Vector (Hermitian width) a
forall sh a. (C sh, Floating a) => Vector sh a -> Vector sh a
Vector.conjugate

instance (Shape.C shape) => Inverse (MatrixShape.Hermitian shape) where
   inverse :: Array (Hermitian shape) a -> Array (Hermitian shape) a
inverse = Array (Hermitian shape) a -> Array (Hermitian shape) a
forall sh a. (C sh, Floating a) => Hermitian sh a -> Hermitian sh a
Hermitian.inverse


instance
   (MatrixShape.Content lo, MatrixShape.Content up,
    MatrixShape.TriDiag diag, Shape.C shape) =>
      Determinant (MatrixShape.Triangular lo diag up shape) where
   determinant :: Array (Triangular lo diag up shape) a -> a
determinant = Array (Triangular lo diag up shape) a -> a
forall lo up diag sh a.
(Content lo, Content up, TriDiag diag, C sh, Floating a) =>
Triangular lo diag up sh a -> a
Triangular.determinant

instance
   (MatrixShape.Content lo, MatrixShape.Content up,
    MatrixShape.TriDiag diag, Shape.C shape) =>
      Solve (MatrixShape.Triangular lo diag up shape) where
   solveRight :: Array (Triangular lo diag up shape) a
-> Full vert horiz height width a -> Full vert horiz height width a
solveRight = Array (Triangular lo diag up shape) a
-> Full vert horiz height width a -> Full vert horiz height width a
forall lo up diag vert horiz sh nrhs a.
(Content lo, Content up, TriDiag diag, C vert, C horiz, C sh,
 Eq sh, C nrhs, Floating a) =>
Triangular lo diag up sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Triangular.solve
   solveLeft :: Full vert horiz height width a
-> Array (Triangular lo diag up shape) a
-> Full vert horiz height width a
solveLeft = (Triangular lo diag up width a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Triangular lo diag up width a
-> Full vert horiz height width a
forall vertA vertB horizA horizB matrix widthA heightA a widthB
       heightB.
(C vertA, C vertB, C horizA, C horizB) =>
(matrix
 -> Full horizA vertA widthA heightA a
 -> Full horizB vertB widthB heightB a)
-> Full vertA horizA heightA widthA a
-> matrix
-> Full vertB horizB heightB widthB a
swapMultiply ((Triangular lo diag up width a
  -> Full horiz vert width height a
  -> Full horiz vert width height a)
 -> Full vert horiz height width a
 -> Triangular lo diag up width a
 -> Full vert horiz height width a)
-> (Triangular lo diag up width a
    -> Full horiz vert width height a
    -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Triangular lo diag up width a
-> Full vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Triangular up diag lo width a
-> Full horiz vert width height a -> Full horiz vert width height a
forall lo up diag vert horiz sh nrhs a.
(Content lo, Content up, TriDiag diag, C vert, C horiz, C sh,
 Eq sh, C nrhs, Floating a) =>
Triangular lo diag up sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Triangular.solve (Triangular up diag lo width a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> (Triangular lo diag up width a -> Triangular up diag lo width a)
-> Triangular lo diag up width a
-> Full horiz vert width height a
-> Full horiz vert width height a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Triangular lo diag up width a -> Triangular up diag lo width a
forall lo up diag sh a.
(Content lo, Content up, TriDiag diag) =>
Triangular lo diag up sh a -> Triangular up diag lo sh a
Triangular.transpose

instance
   (Triangular.PowerContentDiag lo diag up, Shape.C shape) =>
      Inverse (MatrixShape.Triangular lo diag up shape) where
   inverse :: Array (Triangular lo diag up shape) a
-> Array (Triangular lo diag up shape) a
inverse = Array (Triangular lo diag up shape) a
-> Array (Triangular lo diag up shape) a
forall lo up diag sh a.
(Content lo, Content up, TriDiag diag, C sh, Floating a) =>
Triangular lo diag up sh a
-> Triangular lo (PowerDiag lo up diag) up sh a
Triangular.inverse


instance
   (Unary.Natural sub, Unary.Natural super, vert ~ Small, horiz ~ Small,
    Shape.C width, Shape.C height, width ~ height) =>
      Determinant (MatrixShape.Banded sub super vert horiz height width) where
   determinant :: Array (Banded sub super vert horiz height width) a -> a
determinant = Array (Banded sub super vert horiz height width) a -> a
forall sub super sh a.
(Natural sub, Natural super, C sh, Floating a) =>
Square sub super sh a -> a
Banded.determinant

instance
   (Unary.Natural sub, Unary.Natural super, vert ~ Small, horiz ~ Small,
    Shape.C width, Shape.C height, width ~ height) =>
      Solve (MatrixShape.Banded sub super vert horiz height width) where
   solveRight :: Array (Banded sub super vert horiz height width) a
-> Full vert horiz height width a -> Full vert horiz height width a
solveRight = Array (Banded sub super vert horiz height width) a
-> Full vert horiz height width a -> Full vert horiz height width a
forall sub super vert horiz sh nrhs a.
(Natural sub, Natural super, C vert, C horiz, C sh, Eq sh, C nrhs,
 Floating a) =>
Square sub super sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Banded.solve
   solveLeft :: Full vert horiz height width a
-> Array (Banded sub super vert horiz height width) a
-> Full vert horiz height width a
solveLeft = (Banded sub super Small Small width width a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Banded sub super Small Small width width a
-> Full vert horiz height width a
forall vertA vertB horizA horizB matrix widthA heightA a widthB
       heightB.
(C vertA, C vertB, C horizA, C horizB) =>
(matrix
 -> Full horizA vertA widthA heightA a
 -> Full horizB vertB widthB heightB a)
-> Full vertA horizA heightA widthA a
-> matrix
-> Full vertB horizB heightB widthB a
swapMultiply ((Banded sub super Small Small width width a
  -> Full horiz vert width height a
  -> Full horiz vert width height a)
 -> Full vert horiz height width a
 -> Banded sub super Small Small width width a
 -> Full vert horiz height width a)
-> (Banded sub super Small Small width width a
    -> Full horiz vert width height a
    -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Banded sub super Small Small width width a
-> Full vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Square super sub width a
-> Full horiz vert width height a -> Full horiz vert width height a
forall sub super vert horiz sh nrhs a.
(Natural sub, Natural super, C vert, C horiz, C sh, Eq sh, C nrhs,
 Floating a) =>
Square sub super sh a
-> Full vert horiz sh nrhs a -> Full vert horiz sh nrhs a
Banded.solve (Square super sub width a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> (Banded sub super Small Small width width a
    -> Square super sub width a)
-> Banded sub super Small Small width width a
-> Full horiz vert width height a
-> Full horiz vert width height a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Banded sub super Small Small width width a
-> Square super sub width a
forall vert horiz sub super height width a.
(C vert, C horiz) =>
Banded sub super vert horiz height width a
-> Banded super sub horiz vert width height a
Banded.transpose


{- |
There is no solver for general banded Hermitian matrices.
Thus the instance will fail for an indefinite matrix.
-}
instance
   (Unary.Natural offDiag, Shape.C size) =>
      Determinant (MatrixShape.BandedHermitian offDiag size) where
   determinant :: Array (BandedHermitian offDiag size) a -> a
determinant = RealOf a -> a
forall a. Floating a => RealOf a -> a
Scalar.fromReal (RealOf a -> a)
-> (Array (BandedHermitian offDiag size) a -> RealOf a)
-> Array (BandedHermitian offDiag size) a
-> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Array (BandedHermitian offDiag size) a -> RealOf a
forall offDiag size a.
(Natural offDiag, C size, Floating a) =>
BandedHermitian offDiag size a -> RealOf a
BandedHermitianPositiveDefinite.determinant

{- |
There is no solver for indefinite matrices.
Thus the instance will fail for indefinite but solvable systems.
-}
instance
   (Unary.Natural offDiag, Shape.C size) =>
      Solve (MatrixShape.BandedHermitian offDiag size) where
   solveRight :: Array (BandedHermitian offDiag size) a
-> Full vert horiz height width a -> Full vert horiz height width a
solveRight = Array (BandedHermitian offDiag size) a
-> Full vert horiz height width a -> Full vert horiz height width a
forall offDiag size vert horiz nrhs a.
(Natural offDiag, C size, Eq size, C vert, C horiz, C nrhs,
 Floating a) =>
BandedHermitian offDiag size a
-> Full vert horiz size nrhs a -> Full vert horiz size nrhs a
BandedHermitianPositiveDefinite.solve
   solveLeft :: Full vert horiz height width a
-> Array (BandedHermitian offDiag size) a
-> Full vert horiz height width a
solveLeft =
      (Vector (BandedHermitian offDiag width) a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Vector (BandedHermitian offDiag width) a
-> Full vert horiz height width a
forall vertA vertB horizA horizB matrix widthA heightA a widthB
       heightB.
(C vertA, C vertB, C horizA, C horizB) =>
(matrix
 -> Full horizA vertA widthA heightA a
 -> Full horizB vertB widthB heightB a)
-> Full vertA horizA heightA widthA a
-> matrix
-> Full vertB horizB heightB widthB a
swapMultiply ((Vector (BandedHermitian offDiag width) a
  -> Full horiz vert width height a
  -> Full horiz vert width height a)
 -> Full vert horiz height width a
 -> Vector (BandedHermitian offDiag width) a
 -> Full vert horiz height width a)
-> (Vector (BandedHermitian offDiag width) a
    -> Full horiz vert width height a
    -> Full horiz vert width height a)
-> Full vert horiz height width a
-> Vector (BandedHermitian offDiag width) a
-> Full vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Vector (BandedHermitian offDiag width) a
-> Full horiz vert width height a -> Full horiz vert width height a
forall offDiag size vert horiz nrhs a.
(Natural offDiag, C size, Eq size, C vert, C horiz, C nrhs,
 Floating a) =>
BandedHermitian offDiag size a
-> Full vert horiz size nrhs a -> Full vert horiz size nrhs a
BandedHermitianPositiveDefinite.solve (Vector (BandedHermitian offDiag width) a
 -> Full horiz vert width height a
 -> Full horiz vert width height a)
-> (Vector (BandedHermitian offDiag width) a
    -> Vector (BandedHermitian offDiag width) a)
-> Vector (BandedHermitian offDiag width) a
-> Full horiz vert width height a
-> Full horiz vert width height a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector (BandedHermitian offDiag width) a
-> Vector (BandedHermitian offDiag width) a
forall sh a. (C sh, Floating a) => Vector sh a -> Vector sh a
Vector.conjugate