[082b02]: src / modules / bugs / functions / Probit.cc  Maximize  Restore  History

Download this file

28 lines (20 with data), 452 Bytes

 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
#include <config.h>
#include "Probit.h"
#include <JRmath.h>
using std::vector;
namespace jags {
namespace bugs {
Probit::Probit ()
: ScalarFunction ("probit", 1)
{
}
double Probit::evaluate(vector<double const *> const &args) const
{
return qnorm (*args[0], 0, 1, 1, 0);
}
bool Probit::checkParameterValue (vector <double const *> const &args) const
{
double p = *args[0];
return (p >= 0 && p <= 1);
}
}}

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks