algebra-4.3.1: Constructive abstract algebra

Safe HaskellNone
LanguageHaskell98

Numeric.Algebra.Quaternion

Synopsis

Documentation

class Distinguished t where Source #

Minimal complete definition

e

Methods

e :: t Source #

Instances

Distinguished TrigBasis Source # 

Methods

e :: TrigBasis Source #

Distinguished QuaternionBasis' Source # 
Distinguished DualBasis' Source # 

Methods

e :: DualBasis' Source #

Distinguished QuaternionBasis Source # 
Distinguished DualBasis Source # 

Methods

e :: DualBasis Source #

Distinguished ComplexBasis Source # 
Rig r => Distinguished (Trig r) Source # 

Methods

e :: Trig r Source #

Rig r => Distinguished (Quaternion' r) Source # 

Methods

e :: Quaternion' r Source #

Rig r => Distinguished (Dual' r) Source # 

Methods

e :: Dual' r Source #

Rig r => Distinguished (Quaternion r) Source # 

Methods

e :: Quaternion r Source #

Rig r => Distinguished (Dual r) Source # 

Methods

e :: Dual r Source #

Rig r => Distinguished (Complex r) Source # 

Methods

e :: Complex r Source #

Rig r => Distinguished (TrigBasis -> r) Source # 

Methods

e :: TrigBasis -> r Source #

Rig r => Distinguished (QuaternionBasis' -> r) Source # 

Methods

e :: QuaternionBasis' -> r Source #

Rig r => Distinguished (DualBasis' -> r) Source # 

Methods

e :: DualBasis' -> r Source #

Rig r => Distinguished (QuaternionBasis -> r) Source # 

Methods

e :: QuaternionBasis -> r Source #

Rig r => Distinguished (DualBasis -> r) Source # 

Methods

e :: DualBasis -> r Source #

Rig r => Distinguished (ComplexBasis -> r) Source # 

Methods

e :: ComplexBasis -> r Source #

Distinguished a => Distinguished (Covector r a) Source # 

Methods

e :: Covector r a Source #

data QuaternionBasis Source #

Constructors

E 
I 
J 
K 

Instances

Bounded QuaternionBasis Source # 
Enum QuaternionBasis Source # 
Eq QuaternionBasis Source # 
Data QuaternionBasis Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QuaternionBasis -> c QuaternionBasis #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QuaternionBasis #

toConstr :: QuaternionBasis -> Constr #

dataTypeOf :: QuaternionBasis -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c QuaternionBasis) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QuaternionBasis) #

gmapT :: (forall b. Data b => b -> b) -> QuaternionBasis -> QuaternionBasis #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QuaternionBasis -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QuaternionBasis -> r #

gmapQ :: (forall d. Data d => d -> u) -> QuaternionBasis -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> QuaternionBasis -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> QuaternionBasis -> m QuaternionBasis #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QuaternionBasis -> m QuaternionBasis #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QuaternionBasis -> m QuaternionBasis #

Ord QuaternionBasis Source # 
Read QuaternionBasis Source # 
Show QuaternionBasis Source # 
Ix QuaternionBasis Source # 
Distinguished QuaternionBasis Source # 
Complicated QuaternionBasis Source # 
Hamiltonian QuaternionBasis Source # 
MonadReader QuaternionBasis Quaternion Source # 
(TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis Source #

the trivial diagonal coalgebra

(TriviallyInvolutive r, Rng r) => Algebra r QuaternionBasis Source #

the quaternion algebra

(TriviallyInvolutive r, Rng r) => Bialgebra r QuaternionBasis Source # 
(TriviallyInvolutive r, Rng r) => CounitalCoalgebra r QuaternionBasis Source # 

Methods

counit :: (QuaternionBasis -> r) -> r Source #

(TriviallyInvolutive r, Rng r) => UnitalAlgebra r QuaternionBasis Source # 

Methods

unit :: r -> QuaternionBasis -> r Source #

(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => HopfAlgebra r QuaternionBasis Source # 
(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => InvolutiveCoalgebra r QuaternionBasis Source # 

Methods

coinv :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source #

(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => InvolutiveAlgebra r QuaternionBasis Source # 

Methods

inv :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source #

Rig r => Distinguished (QuaternionBasis -> r) Source # 

Methods

e :: QuaternionBasis -> r Source #

Rig r => Complicated (QuaternionBasis -> r) Source # 

Methods

i :: QuaternionBasis -> r Source #

Rig r => Hamiltonian (QuaternionBasis -> r) Source # 

data Quaternion a Source #

Constructors

Quaternion a a a a 

Instances

Monad Quaternion Source # 

Methods

(>>=) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #

(>>) :: Quaternion a -> Quaternion b -> Quaternion b #

return :: a -> Quaternion a #

fail :: String -> Quaternion a #

Functor Quaternion Source # 

Methods

fmap :: (a -> b) -> Quaternion a -> Quaternion b #

(<$) :: a -> Quaternion b -> Quaternion a #

Applicative Quaternion Source # 

Methods

pure :: a -> Quaternion a #

(<*>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #

liftA2 :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

(*>) :: Quaternion a -> Quaternion b -> Quaternion b #

(<*) :: Quaternion a -> Quaternion b -> Quaternion a #

Foldable Quaternion Source # 

Methods

fold :: Monoid m => Quaternion m -> m #

foldMap :: Monoid m => (a -> m) -> Quaternion a -> m #

foldr :: (a -> b -> b) -> b -> Quaternion a -> b #

foldr' :: (a -> b -> b) -> b -> Quaternion a -> b #

foldl :: (b -> a -> b) -> b -> Quaternion a -> b #

foldl' :: (b -> a -> b) -> b -> Quaternion a -> b #

foldr1 :: (a -> a -> a) -> Quaternion a -> a #

foldl1 :: (a -> a -> a) -> Quaternion a -> a #

toList :: Quaternion a -> [a] #

null :: Quaternion a -> Bool #

length :: Quaternion a -> Int #

elem :: Eq a => a -> Quaternion a -> Bool #

maximum :: Ord a => Quaternion a -> a #

minimum :: Ord a => Quaternion a -> a #

sum :: Num a => Quaternion a -> a #

product :: Num a => Quaternion a -> a #

Traversable Quaternion Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Quaternion a -> f (Quaternion b) #

sequenceA :: Applicative f => Quaternion (f a) -> f (Quaternion a) #

mapM :: Monad m => (a -> m b) -> Quaternion a -> m (Quaternion b) #

sequence :: Monad m => Quaternion (m a) -> m (Quaternion a) #

Distributive Quaternion Source # 

Methods

distribute :: Functor f => f (Quaternion a) -> Quaternion (f a) #

collect :: Functor f => (a -> Quaternion b) -> f a -> Quaternion (f b) #

distributeM :: Monad m => m (Quaternion a) -> Quaternion (m a) #

collectM :: Monad m => (a -> Quaternion b) -> m a -> Quaternion (m b) #

Representable Quaternion Source # 

Associated Types

type Rep (Quaternion :: * -> *) :: * #

Methods

tabulate :: (Rep Quaternion -> a) -> Quaternion a #

index :: Quaternion a -> Rep Quaternion -> a #

Traversable1 Quaternion Source # 

Methods

traverse1 :: Apply f => (a -> f b) -> Quaternion a -> f (Quaternion b) #

sequence1 :: Apply f => Quaternion (f b) -> f (Quaternion b) #

Foldable1 Quaternion Source # 

Methods

fold1 :: Semigroup m => Quaternion m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Quaternion a -> m #

toNonEmpty :: Quaternion a -> NonEmpty a #

Apply Quaternion Source # 

Methods

(<.>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #

(.>) :: Quaternion a -> Quaternion b -> Quaternion b #

(<.) :: Quaternion a -> Quaternion b -> Quaternion a #

Bind Quaternion Source # 

Methods

(>>-) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #

join :: Quaternion (Quaternion a) -> Quaternion a #

MonadReader QuaternionBasis Quaternion Source # 
RightModule r s => RightModule r (Quaternion s) Source # 

Methods

(*.) :: Quaternion s -> r -> Quaternion s Source #

LeftModule r s => LeftModule r (Quaternion s) Source # 

Methods

(.*) :: r -> Quaternion s -> Quaternion s Source #

(TriviallyInvolutive r, Rng r) => Quadrance r (Quaternion r) Source # 

Methods

quadrance :: Quaternion r -> r Source #

Eq a => Eq (Quaternion a) Source # 

Methods

(==) :: Quaternion a -> Quaternion a -> Bool #

(/=) :: Quaternion a -> Quaternion a -> Bool #

Data a => Data (Quaternion a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Quaternion a -> c (Quaternion a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Quaternion a) #

toConstr :: Quaternion a -> Constr #

dataTypeOf :: Quaternion a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Quaternion a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Quaternion a)) #

gmapT :: (forall b. Data b => b -> b) -> Quaternion a -> Quaternion a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Quaternion a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Quaternion a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

Read a => Read (Quaternion a) Source # 
Show a => Show (Quaternion a) Source # 
Idempotent r => Idempotent (Quaternion r) Source # 
Abelian r => Abelian (Quaternion r) Source # 
Partitionable r => Partitionable (Quaternion r) Source # 

Methods

partitionWith :: (Quaternion r -> Quaternion r -> r) -> Quaternion r -> NonEmpty r Source #

Additive r => Additive (Quaternion r) Source # 
Monoidal r => Monoidal (Quaternion r) Source # 
(TriviallyInvolutive r, Rng r) => Semiring (Quaternion r) Source # 
(TriviallyInvolutive r, Rng r) => Multiplicative (Quaternion r) Source # 
Group r => Group (Quaternion r) Source # 
(TriviallyInvolutive r, Ring r) => Unital (Quaternion r) Source # 
(TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion r) Source # 
(TriviallyInvolutive r, Rng r) => InvolutiveMultiplication (Quaternion r) Source # 
(TriviallyInvolutive r, Ring r) => Rig (Quaternion r) Source # 
(TriviallyInvolutive r, Ring r) => Ring (Quaternion r) Source # 
Rig r => Distinguished (Quaternion r) Source # 

Methods

e :: Quaternion r Source #

Rig r => Complicated (Quaternion r) Source # 

Methods

i :: Quaternion r Source #

Rig r => Hamiltonian (Quaternion r) Source # 
(TriviallyInvolutive r, Rng r) => RightModule (Quaternion r) (Quaternion r) Source # 
(TriviallyInvolutive r, Rng r) => LeftModule (Quaternion r) (Quaternion r) Source # 
type Rep Quaternion Source # 

complicate :: Complicated c => QuaternionBasis -> (c, c) Source #

Cayley-Dickson quaternion isomorphism (one way)

vectorPart :: (Representable f, Rep f ~ QuaternionBasis) => f r -> (r, r, r) Source #