Statistics
| Revision:

root / branches / pthreads-737 / src / df1b2-separable / df1b2cum.cpp @ 765

History | View | Annotate | Download (619 Bytes)

1
/*
2
 * $Id: df1b2cum.cpp 542 2012-07-10 21:04:06Z johnoel $
3
 *
4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
6
 */
7
/**
8
 * \file
9
 * Description not yet available.
10
 */
11
#include <df1b2fun.h>
12

    
13
/**
14
 * Description not yet available.
15
 * \param
16
 */
17
df1b2variable inv_cumd_exponential(const df1b2variable& y)
18
{
19
  if (value(y)<=0.5)
20
    return log(2.0*y);
21
  else
22
    return log(2.0*(1-y));
23
}
24

    
25
/**
26
 * Description not yet available.
27
 * \param
28
 */
29
df1b2variable cumd_exponential(const df1b2variable& x)
30
{
31
  if (value(x)<=0.0)
32
    return 0.5*exp(x);
33
  else
34
    return 1.0-0.5*exp(-x);
35
}
36