toy-lib
Safe HaskellNone
LanguageHaskell2010

Data.Core.SemigroupAction

Description

Semigroup action * is an operator where \(s_2 * (s_1 * a) == (s_2 \diamond s_1) * a\) holds.

Synopsis

Documentation

class SemigroupAction s a where #

Right semigroup aciton.

Methods

sact :: s -> a -> a #

Right semigroup aciton

Instances

Instances details
Semigroup a => SemigroupAction a a # 
Instance details

Defined in Data.Core.SemigroupAction

Methods

sact :: a -> a -> a #

Num a => SemigroupAction (Affine1 a) a #

Limited to length 1

Instance details

Defined in Data.Instances.Affine1

Methods

sact :: Affine1 a -> a -> a #

Num a => SemigroupAction (Affine1 a) (V2 a) # 
Instance details

Defined in Data.Instances.Affine1

Methods

sact :: Affine1 a -> V2 a -> V2 a #

Num a => SemigroupAction (Mat2x2 a) (V2 a) # 
Instance details

Defined in Data.Instances.Affine1

Methods

sact :: Mat2x2 a -> V2 a -> V2 a #

sactTimes :: (Semigroup s, SemigroupAction s a) => Int -> s -> a -> a #

Performs sact with the binary lifting technique. Prefer the binary lifting module if the cache takes effect.