dde 0.0.0 → 0.0.1
raw patch · 4 files changed
+15/−11 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Numeric.DDE: Inp :: Double -> InputSnapshot
+ Numeric.DDE: [_insnap] :: InputSnapshot -> Double
+ Numeric.DDE: newtype InputSnapshot
Files
- README.md +6/−4
- dde.cabal +2/−2
- dde/Numeric/DDE.hs +6/−4
- dde/Numeric/DDE/Types.hs +1/−1
README.md view
@@ -2,10 +2,12 @@ ## Features -* DDEs with multiple dynamical variables and a single delay (pull requests are welcome)-* Driven systems (with external input)+* Autonomous DDEs with multiple dynamical variables and a single delay (pull requests are welcome)+* Driven systems (i.e. with external input)+* Non-autonomous DDEs (using driven systems with time as external input) * Second and fourth order integration methods * Example models:- * Mackey-Glass with no external input- * Driven system+ * [Mackey-Glass](https://github.com/masterdezign/dde/blob/master/examples/MackeyGlass/Main.hs) with no external input+ * [Driven system](https://github.com/masterdezign/dde/blob/d7f636372b537b948d00097ecd09e689854b9392/dde/Numeric/DDE/Model.hs#L59) * Pure Haskell+
dde.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: a8f746086619c8bfab833f302e37ef3d130b22183d5388e5636b5efe2b4a1052+-- hash: eccc053c08411c8b92867a2d841ded9b1ba3ad1c1d3ac27e70e5acc6243c84df name: dde-version: 0.0.0+version: 0.0.1 synopsis: Delay differential equations description: Please see the README on Github at <https://github.com/masterdezign/dde#readme> category: Math
dde/Numeric/DDE.hs view
@@ -39,7 +39,8 @@ > > main = do > let hStep = 0.001 -- Integration step- > samplesPerDelay = round $ 1.0 / hStep+ > tauD = 1.0 -- Delay time+ > samplesPerDelay = round $ tauD / hStep > delays = 8 > total = delays * samplesPerDelay >@@ -57,6 +58,7 @@ , integRk4_2D , integHeun2_2D , Input (..)+ , InputSnapshot (..) , State (..) , HistorySnapshot (..) @@ -164,14 +166,14 @@ VM.unsafeWrite v i x' go v (i + 1) xy' --- | Generic integrator that records the whole time trace $x(t)$+-- | Generic integrator that records the whole time trace @x(t)@ integ :: Stepper1 -> State -- ^ Initial state x(t), y(t),... -> V.Vector Double -- ^ Initial history for the delayed variable -> Int -- ^ Delay length in samples- -> Double- -> RHS+ -> Double -- ^ Integration step+ -> RHS -- ^ Derivative (DDE right-hand side) -> Input -- ^ External forcing -> (State, V.Vector Double) integ (Stepper1 stp) state0 hist0 len1 hStep rhs' inp@(Input in1) = r
dde/Numeric/DDE/Types.hs view
@@ -23,7 +23,7 @@ newtype Input = Input { _input :: V.Vector Double } -- | Contains only the required snapshot of history to make steppers (e.g. Heun) work.--- There could be several delay variables (as in rc-analog)+-- There could be several delay variables newtype HistorySnapshot = Hist { _histsnap :: V.Vector Double } -- | Stepper for DDEs with a single delay