File: SimulatorDPBase.h

package info (click to toggle)
stopt 5.12%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 8,860 kB
  • sloc: cpp: 70,456; python: 5,950; makefile: 72; sh: 57
file content (56 lines) | stat: -rw-r--r-- 2,140 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (C) 2016 EDF
// All Rights Reserved
// This code is published under the GNU Lesser General Public License (GNU LGPL)
#ifndef SIMULATORDPBASE_H
#define SIMULATORDPBASE_H
#include <Eigen/Dense>

/* \file SimulatorDPBase.h
 * \brief Abstract class for simulators for Dynamic Programming Programms
 * \author Xavier Warin
 */

namespace StOpt
{
/// \class SimulatorDPBase SimulatorDPBase.h
/// Abstract class for simulator used in dynamic programming
class SimulatorDPBase
{


public :

    /// \brief Constructor
    SimulatorDPBase() {}
    /// \brief Destructor
    virtual ~SimulatorDPBase() {}
    /// \brief get current  markovian state : dimension of the problem for the  first dimension , second dimension the number of Monte Carlo simulations
    virtual Eigen::MatrixXd getParticles() const = 0;
    /// \brief a step forward for simulations
    virtual void  stepForward() = 0;
    /// \brief a step backward for simulations
    virtual void  stepBackward() = 0;
    /// \brief a step forward for simulations
    /// \return  current particles (markovian state as assets for example) (dimension of the problem times simulation number)
    virtual Eigen::MatrixXd  stepForwardAndGetParticles() = 0;
    /// \brief a step backward for simulations
    /// \return  current particles (markovian state as assets for example) (dimension of the problem times simulation number)
    virtual Eigen::MatrixXd stepBackwardAndGetParticles() = 0;
    /// \brief get back dimension of the regression
    virtual int getDimension() const = 0;
    /// \brief get the number of steps
    virtual  int getNbStep() const = 0;
    /// \brief Get the current step size
    virtual double getStep() const = 0;
    /// \brief Get current time
    virtual double getCurrentStep() const = 0 ;
    /// \brief Number of Monte Carlo simulations
    virtual int getNbSimul() const = 0;
    /// \brief Permit to actualize for one time step (interest rate)
    virtual double getActuStep() const = 0;
    /// \brief Permits to actualize at the initial date (interest rate)
    virtual double getActu() const = 0 ;

};
}
#endif /* SIMULATORDPBASE_H */