Statistics
| Revision:

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

History | View | Annotate | Download (870 Bytes)

1
/*
2
 * $Id: df1b2norlogmix.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 robust_normal_logistic_mixture_deviate(const df1b2variable& x,
18
  double spread)
19
{
20

    
21
  df1b2variable y=cumd_norm(x);
22
  y = 0.99999999*y + 0.000000005; // To gain numerical stability
23
  df1b2variable z = inv_cumd_normal_logistic_mixture(y,spread);
24
  return z;
25
}
26

    
27
/**
28
 * Description not yet available.
29
 * \param
30
 */
31
df1b2variable robust_normal_mixture_deviate(const df1b2variable& x,
32
  double spread)
33
{
34
  df1b2variable y=cumd_norm(x);
35
  y = 0.99999999*y + 0.000000005; // To gain numerical stability
36
  df1b2variable z = inv_cumd_normal_mixture(y,spread);
37
  return z;
38
}