nonlinear-optimization 0.2 → 0.3
raw patch · 2 files changed
+18/−7 lines, 2 files
Files
Numeric/Optimization/Algorithms/HagerZhang05.hsc view
@@ -9,7 +9,7 @@ -- -- This module implements the algorithms described by Hager and -- Zhang [1]. We use bindings to @CG_DESCENT@ library by the same--- authors, version 3.0 from 18/05/2008 [2]. The library code is+-- authors, version 3.0 from 18\/05\/2008 [2]. The library code is -- also licensed under the terms of the GPL. -- -- * [1] Hager, W. W. and Zhang, H. /A new conjugate gradient/@@ -30,6 +30,8 @@ ,Function(..) ,Gradient(..) ,Combined(..)+ ,PointMVector+ ,GradientMVector -- ** Kinds of function types ,Simple ,Mutable@@ -135,6 +137,15 @@ -- | Phantom type for functions using mutable data. data Mutable +-- | Mutable vector representing the point where the+-- function\/gradient is begin evaluated. This vector /should/+-- /not/ be modified.+type PointMVector m = SM.MVector (PrimState m) Double++-- | Mutable vector representing where the gradient should be+-- /written/.+type GradientMVector m = SM.MVector (PrimState m) Double+ -- | Function calculating the value of the objective function @f@ -- at a point @x@. data Function t where@@ -142,7 +153,7 @@ => (v Double -> Double) -> Function Simple MFunction :: (forall m. PrimMonad m- => SM.MVector (PrimState m) Double+ => PointMVector m -> m Double) -> Function Mutable @@ -185,8 +196,8 @@ => (v Double -> v Double) -> Gradient Simple MGradient :: (forall m. PrimMonad m- => SM.MVector (PrimState m) Double- -> SM.MVector (PrimState m) Double+ => PointMVector m+ -> GradientMVector m -> m ()) -> Gradient Mutable mutableG :: Gradient t -> Gradient Mutable@@ -236,8 +247,8 @@ => (v Double -> (Double, v Double)) -> Combined Simple MCombined :: (forall m. PrimMonad m- => SM.MVector (PrimState m) Double- -> SM.MVector (PrimState m) Double+ => PointMVector m+ -> GradientMVector m -> m Double) -> Combined Mutable mutableC :: Combined t -> Combined Mutable
nonlinear-optimization.cabal view
@@ -3,7 +3,7 @@ Tested-With: GHC Category: Math Name: nonlinear-optimization-Version: 0.2+Version: 0.3 Stability: experimental License: GPL License-File: LICENSE