module Bio.Utils.Matrix
  ( eig3
  ) where

import Linear.Matrix
import Linear.V3

import Bio.Utils.Geometry ( R )

eig3 :: M33 R -> V3 R
eig3 :: M33 R -> V3 R
eig3 M33 R
m | M33 R -> Bool
forall a. Eq a => M33 a -> Bool
isSym M33 R
m = M33 R -> V3 R
ei3sym M33 R
m
       | Bool
otherwise = V3 R
forall a. HasCallStack => a
undefined
  where
    ei3sym :: M33 R -> V3 R
    ei3sym :: M33 R -> V3 R
ei3sym = M33 R -> V3 R
forall a. HasCallStack => a
undefined

isSym :: Eq a => M33 a -> Bool
isSym :: M33 a -> Bool
isSym (V3 (V3 a
_   a
a21 a
a31)
          (V3 a
a12 a
_   a
a32)
          (V3 a
a13 a
a23 a
_  )) = a
a21 a -> a -> Bool
forall a. Eq a => a -> a -> Bool
== a
a12 Bool -> Bool -> Bool
&& a
a31 a -> a -> Bool
forall a. Eq a => a -> a -> Bool
== a
a13 Bool -> Bool -> Bool
&& a
a32 a -> a -> Bool
forall a. Eq a => a -> a -> Bool
== a
a23