horde-ad-0.1.0.0: Higher Order Reverse Derivatives Efficiently - Automatic Differentiation
Safe HaskellNone
LanguageGHC2024

Shared

Description

Additional classes that help in comparing values in tests.

Synopsis

Documentation

class HasShape a where Source #

Things that have shape.

Methods

shapeL :: a -> [Int] Source #

Instances

Instances details
HasShape CInt Source # 
Instance details

Defined in Shared

Methods

shapeL :: CInt -> [Int] Source #

HasShape Int64 Source # 
Instance details

Defined in Shared

Methods

shapeL :: Int64 -> [Int] Source #

HasShape Z1 Source # 
Instance details

Defined in Shared

Methods

shapeL :: Z1 -> [Int] Source #

HasShape Double Source # 
Instance details

Defined in Shared

Methods

shapeL :: Double -> [Int] Source #

HasShape Float Source # 
Instance details

Defined in Shared

Methods

shapeL :: Float -> [Int] Source #

HasShape (RepConcrete y) => HasShape (Concrete y) Source # 
Instance details

Defined in Shared

Methods

shapeL :: Concrete y -> [Int] Source #

Foldable t => HasShape (t a) Source # 
Instance details

Defined in Shared

Methods

shapeL :: t a -> [Int] Source #

(KnownNat n, PrimElt a) => HasShape (Ranked n a) Source # 
Instance details

Defined in Shared

Methods

shapeL :: Ranked n a -> [Int] Source #

KnownShS sh => HasShape (Shaped sh a) Source # 
Instance details

Defined in Shared

Methods

shapeL :: Shaped sh a -> [Int] Source #

class Linearizable a b | a -> b where Source #

Things that can be linearized, i.e. converted to a list.

Methods

linearize :: a -> [b] Source #

Instances

Instances details
Linearizable CInt CInt Source # 
Instance details

Defined in Shared

Methods

linearize :: CInt -> [CInt] Source #

Linearizable Int64 Int64 Source # 
Instance details

Defined in Shared

Methods

linearize :: Int64 -> [Int64] Source #

Linearizable Z1 Z1 Source # 
Instance details

Defined in Shared

Methods

linearize :: Z1 -> [Z1] Source #

Linearizable Double Double Source # 
Instance details

Defined in Shared

Methods

linearize :: Double -> [Double] Source #

Linearizable Float Float Source # 
Instance details

Defined in Shared

Methods

linearize :: Float -> [Float] Source #

Linearizable (RepConcrete y) a => Linearizable (Concrete y) a Source # 
Instance details

Defined in Shared

Methods

linearize :: Concrete y -> [a] Source #

Foldable t => Linearizable (t a) a Source # 
Instance details

Defined in Shared

Methods

linearize :: t a -> [a] Source #

(Storable a, PrimElt a) => Linearizable (Ranked n a) a Source # 
Instance details

Defined in Shared

Methods

linearize :: Ranked n a -> [a] Source #

(Storable a, PrimElt a) => Linearizable (Shaped sh a) a Source # 
Instance details

Defined in Shared

Methods

linearize :: Shaped sh a -> [a] Source #