Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Distribution
templateDistribution.h
1
/* Marmote is free software: you can redistribute it and/or modify
2
it under the terms of the GNU General Public License as published by
3
the Free Software Foundation, either version 3 of the License, or
4
(at your option) any later version.
5
6
Marmote is distributed in the hope that it will be useful,
7
but WITHOUT ANY WARRANTY; without even the implied warranty of
8
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
GNU General Public License for more details.
10
11
You should have received a copy of the GNU General Public License
12
along with Marmote. If not, see <http://www.gnu.org/licenses/>.
13
14
Copyright 2015 Alain Jean-Marie, Jean-Michel Fourneau, Jean-Marc Vincent, Issam Rabhi */
15
16
#ifndef templateDistribution_H
17
#define templateDistribution_H
18
19
#include "Distribution.h"
20
25
class
templateDistribution
:
public
virtual
Distribution
{
26
27
public
:
37
templateDistribution
(
int
x,
double
* y,
double
* z );
// creation from something
38
39
private
:
40
// private variables specific to the distribution
41
int
_nbVals;
42
double
* _values;
43
double
* _probas;
45
public
:
46
// accessors to specific variables
47
48
public
:
49
// probabilistic member functions
53
double
mean
();
57
double
rate
();
61
double
moment
(
int
order );
65
double
variance
();
69
double
laplace
(
double
s );
// Laplace transform at real points
73
double
dLaplace
(
double
s );
// derivative of the Laplace transform
77
double
cdf
(
double
x );
81
double
ccdf
(
double
x );
85
bool
hasMoment
(
int
order );
86
90
templateDistribution
*
rescale
(
double
factor );
94
templateDistribution
*
copy
();
98
double
sample
();
102
void
iidSample
(
int
n,
double
* s );
103
104
public
:
108
std::string
toString
();
112
void
write
( FILE *out,
int
mode );
113
114
};
115
116
#endif // templateDistribution_H
Generated on Thu May 21 2015 17:06:41 for Marmote Core by
1.8.3.1