Module

Data.FastVect.Common.Matrix

Package
purescript-fast-vect
Repository
sigma-andex/purescript-fast-vect

#Index Source

type Index :: (Int -> Int -> Type -> Type) -> Int -> Int -> Int -> Int -> Type -> Typetype Index matrix h w i j elem = Compare h NegOne GT => Compare w NegOne GT => Compare i NegOne GT => Compare j NegOne GT => Compare i h LT => Compare j w LT => Reflectable i Int => Reflectable j Int => Proxy i -> Proxy j -> matrix h w elem -> elem

#IndexModulo Source

type IndexModulo :: (Int -> Int -> Type -> Type) -> Int -> Int -> Type -> Typetype IndexModulo matrix h w elem = Compare h Zero GT => Compare w Zero GT => Reflectable h Int => Reflectable w Int => Int -> Int -> matrix h w elem -> elem

#Replicate Source

type Replicate :: (Int -> Int -> Type -> Type) -> Int -> Int -> Type -> Typetype Replicate matrix h w elem = Compare h NegOne GT => Reflectable h Int => Compare w NegOne GT => Reflectable w Int => Proxy h -> Proxy w -> elem -> matrix h w elem

#Generate Source

type Generate :: (Int -> Int -> Type -> Type) -> Int -> Int -> Type -> Typetype Generate matrix h w elem = Reflectable h Int => Compare h NegOne GT => Reflectable w Int => Compare w NegOne GT => Proxy h -> Proxy w -> (forall i j. Reflectable i Int => Reflectable j Int => Compare i h LT => Compare j w LT => Compare i NegOne GT => Compare j NegOne GT => Proxy i -> Proxy j -> elem) -> matrix h w elem

#MapWithTerm Source

type MapWithTerm :: (Int -> Int -> Type -> Type) -> Int -> Int -> Type -> Type -> Typetype MapWithTerm matrix h w elem elem' = Reflectable h Int => Compare h NegOne GT => Reflectable w Int => Compare w NegOne GT => (forall i j. Reflectable i Int => Reflectable j Int => Compare i h LT => Compare j w LT => Compare i NegOne GT => Compare j NegOne GT => Proxy i -> Proxy j -> elem -> elem') -> matrix h w elem -> matrix h w elem'

#Transpose Source

type Transpose :: forall k. (Int -> Int -> k -> Type) -> Int -> Int -> k -> Typetype Transpose matrix h w elem = Reflectable h Int => Compare h NegOne GT => Reflectable w Int => Compare w NegOne GT => matrix h w elem -> matrix w h elem

#DotProduct Source

type DotProduct :: (Int -> Type -> Type) -> Int -> Type -> Typetype DotProduct vect h elem = Reflectable h Int => Compare h NegOne GT => Semiring elem => vect h elem -> vect h elem -> elem

#OuterMap Source

type OuterMap :: (Int -> Type -> Type) -> (Int -> Int -> Type -> Type) -> Int -> Int -> Type -> Type -> Type -> Typetype OuterMap vect matrix h w elemH elemW elem = Reflectable h Int => Compare h NegOne GT => Reflectable w Int => Compare w NegOne GT => (elemH -> elemW -> elem) -> vect h elemH -> vect w elemW -> matrix h w elem

#OuterProduct Source

type OuterProduct :: (Int -> Type -> Type) -> (Int -> Int -> Type -> Type) -> Int -> Int -> Type -> Typetype OuterProduct vect matrix h w elem = Reflectable h Int => Compare h NegOne GT => Reflectable w Int => Compare w NegOne GT => Semiring elem => vect h elem -> vect w elem -> matrix h w elem

#Diag Source

type Diag :: (Int -> Type -> Type) -> (Int -> Int -> Type -> Type) -> Int -> Type -> Typetype Diag vect matrix h elem = Reflectable h Int => Compare h NegOne GT => Semiring elem => vect h elem -> matrix h h elem

#Traced Source

type Traced :: forall k. (Int -> k -> Type) -> (Int -> Int -> k -> Type) -> Int -> k -> Typetype Traced vect matrix h elem = Reflectable h Int => Compare h NegOne GT => matrix h h elem -> vect h elem

#Trace Source

type Trace :: (Int -> Int -> Type -> Type) -> Int -> Type -> Typetype Trace matrix h elem = Reflectable h Int => Semiring elem => Compare h NegOne GT => matrix h h elem -> elem

#Transform Source

type Transform :: (Int -> Type -> Type) -> (Int -> Int -> Type -> Type) -> Int -> Int -> Type -> Typetype Transform vect matrix h w elem = Reflectable h Int => Compare h NegOne GT => Reflectable w Int => Compare w NegOne GT => Semiring elem => matrix h w elem -> vect w elem -> vect h elem

#Product Source

type Product :: (Int -> Int -> Type -> Type) -> Int -> Int -> Int -> Type -> Typetype Product matrix h m w elem = Reflectable h Int => Compare h NegOne GT => Reflectable m Int => Compare m NegOne GT => Reflectable w Int => Compare w NegOne GT => Semiring elem => matrix h m elem -> matrix m w elem -> matrix h w elem

#Empty Source

type Empty :: forall k1 k2. (Int -> Int -> k1 -> k2) -> k1 -> k2type Empty matrix elem = matrix Zero Zero elem

#Modify Source

type Modify :: (Int -> Int -> Type -> Type) -> Int -> Int -> Int -> Int -> Type -> Typetype Modify matrix h w i j elem = Reflectable i Int => Compare i NegOne GT => Compare h NegOne GT => Compare i h LT => Reflectable j Int => Compare j NegOne GT => Compare w NegOne GT => Compare j w LT => Proxy i -> Proxy j -> (elem -> elem) -> matrix h w elem -> matrix h w elem

#Set Source

type Set :: (Int -> Int -> Type -> Type) -> Int -> Int -> Int -> Int -> Type -> Typetype Set matrix h w i j elem = Reflectable i Int => Compare i NegOne GT => Compare h NegOne GT => Compare i h LT => Reflectable j Int => Compare j NegOne GT => Compare w NegOne GT => Compare j w LT => Proxy i -> Proxy j -> elem -> matrix h w elem -> matrix h w elem