noether-0.0.1: Math in Haskell.

Safe HaskellNone
LanguageHaskell2010

Noether.Algebra.Linear.API

Contents

Synopsis

Basic actions

(%<) :: LeftActs Mul r v => r -> v -> v Source #

(>%) :: RightActs Mul r v => v -> r -> v Source #

Using specialized actions

(%<~) :: forall r. Ring Add Mul r => r -> r -> r Source #

Locally use the left self-action induced by the multiplicative magma structure of the ring, whatever structure the user may have chosen to use globally.

a %<~ b = a * b

(~>%) :: forall r. Ring Add Mul r => r -> r -> r Source #

Locally use the right self-action induced by the multiplicative magma structure of the ring, whatever structure the user may have chosen to use globally.

b ~>% a = a * b

Utility functions

lerp :: (Neutral Mul r, Cancellative Add r, Magma Add r, Magma Add a, Acts R Mul r a, Acts L Mul r a) => r -> a -> a -> a Source #

Linear interpolation.

lerp λ v w = λv + (1 - λ)w