ad-4.5.5: Automatic Differentiation
Copyright(c) Edward Kmett 2010-2021
LicenseBSD3
Maintainerekmett@gmail.com
Stabilityexperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.AD.Internal.Sparse.Double

Description

Unsafe and often partial combinators intended for internal usage.

Handle with care.

Synopsis

Documentation

newtype Monomial Source #

Constructors

Monomial (IntMap Int) 

data SparseDouble Source #

We only store partials in sorted order, so the map contained in a partial will only contain partials with equal or greater keys to that of the map in which it was found. This should be key for efficiently computing sparse hessians. there are only n + k - 1 choose k distinct nth partial derivatives of a function with k inputs.

Instances

Instances details
Jacobian SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Associated Types

type D SparseDouble Source #

Mode SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Associated Types

type Scalar SparseDouble Source #

Data SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Methods

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

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

toConstr :: SparseDouble -> Constr #

dataTypeOf :: SparseDouble -> DataType #

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

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

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

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

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

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

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

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

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

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

Enum SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Floating SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

RealFloat SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Num SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Fractional SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Real SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

RealFrac SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Show SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Erf SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

InvErf SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Eq SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Ord SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Grad SparseDouble [Double] (Double, [Double]) Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Grads SparseDouble (Cofree List Double) Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Grads i o => Grads (SparseDouble -> i) (Double -> o) Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Grad i o o' => Grad (SparseDouble -> i) (Double -> o) (Double -> o') Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Methods

pack :: (SparseDouble -> i) -> [SparseDouble] -> SparseDouble Source #

unpack :: ([Double] -> [Double]) -> Double -> o Source #

unpack' :: ([Double] -> (Double, [Double])) -> Double -> o' Source #

type D SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

type Scalar SparseDouble Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

apply :: Traversable f => (f SparseDouble -> b) -> f Double -> b Source #

d :: Traversable f => f b -> SparseDouble -> f Double Source #

skeleton :: Traversable f => f a -> f Int Source #

vgrad :: Grad i o o' => i -> o Source #

vgrad' :: Grad i o o' => i -> o' Source #

vgrads :: Grads i o => i -> o Source #

class Grad i o o' | i -> o o', o -> i o', o' -> i o where Source #

Methods

pack :: i -> [SparseDouble] -> SparseDouble Source #

unpack :: ([Double] -> [Double]) -> o Source #

unpack' :: ([Double] -> (Double, [Double])) -> o' Source #

Instances

Instances details
Grad SparseDouble [Double] (Double, [Double]) Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Grad i o o' => Grad (SparseDouble -> i) (Double -> o) (Double -> o') Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Methods

pack :: (SparseDouble -> i) -> [SparseDouble] -> SparseDouble Source #

unpack :: ([Double] -> [Double]) -> Double -> o Source #

unpack' :: ([Double] -> (Double, [Double])) -> Double -> o' Source #

class Grads i o | i -> o, o -> i where Source #

Instances

Instances details
Grads SparseDouble (Cofree List Double) Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double

Grads i o => Grads (SparseDouble -> i) (Double -> o) Source # 
Instance details

Defined in Numeric.AD.Internal.Sparse.Double