NEURON
HypGeom.cpp
Go to the documentation of this file.
1
#include <../../nrnconf.h>
2
3
/*
4
Copyright (C) 1988 Free Software Foundation
5
written by Dirk Grunwald (grunwald@cs.uiuc.edu)
6
7
This file is part of the GNU C++ Library. This library is free
8
software; you can redistribute it and/or modify it under the terms of
9
the GNU Library General Public License as published by the Free
10
Software Foundation; either version 2 of the License, or (at your
11
option) any later version. This library is distributed in the hope
12
that it will be useful, but WITHOUT ANY WARRANTY; without even the
13
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the GNU Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18
*/
19
#ifdef __GNUG__
20
#pragma implementation
21
#endif
22
#include <
Random.h
>
23
#include <
HypGeom.h
>
24
25
double
HyperGeometric::operator()
()
26
{
27
double
d = (
pGenerator
-> asDouble() >
pP
) ? (1.0 -
pP
) : (
pP
);
28
return
(-
pMean
*
log
(
pGenerator
-> asDouble()) / (2.0 * d) );
29
}
30
HypGeom.h
Random.h
HyperGeometric::pP
double pP
Definition:
HypGeom.h:30
HyperGeometric::pMean
double pMean
Definition:
HypGeom.h:28
HyperGeometric::operator()
virtual double operator()()
Definition:
HypGeom.cpp:25
Random::pGenerator
RNG * pGenerator
Definition:
Random.h:34
log
log
Definition:
extdef.h:4
src
gnu
HypGeom.cpp