module Numeric.LAPACK.Matrix.Array.Triangular where

import qualified Numeric.LAPACK.Matrix.Shape.Private as MatrixShape
import Numeric.LAPACK.Matrix.Array (ArrayMatrix)
import Numeric.LAPACK.Matrix.Shape.Private (NonUnit, Unit)


type Hermitian sh = ArrayMatrix (MatrixShape.Hermitian sh)

type Lower sh = FlexLower NonUnit sh
type Upper sh = FlexUpper NonUnit sh
type Symmetric sh = FlexSymmetric NonUnit sh
type Diagonal sh = FlexDiagonal NonUnit sh

type UnitLower sh = FlexLower Unit sh
type UnitUpper sh = FlexUpper Unit sh

type FlexDiagonal diag sh =
      ArrayMatrix
         (MatrixShape.Triangular MatrixShape.Empty diag MatrixShape.Empty sh)
type FlexLower diag sh = ArrayMatrix (MatrixShape.LowerTriangular diag sh)
type FlexUpper diag sh = ArrayMatrix (MatrixShape.UpperTriangular diag sh)
type FlexSymmetric diag sh = ArrayMatrix (MatrixShape.FlexSymmetric diag sh)

type Triangular lo diag up sh =
         ArrayMatrix (MatrixShape.Triangular lo diag up sh)