[669123]: src / lib / function / DPQFunction.cc  Maximize  Restore  History

Download this file

30 lines (22 with data), 634 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
28
29
#include <config.h>
#include <function/DPQFunction.h>
#include <distribution/RScalarDist.h>
using std::vector;
using std::string;
namespace jags {
DPQFunction::DPQFunction(string const &name, RScalarDist const *dist)
: ScalarFunction(name, dist->npar() + 1), _dist(dist)
{}
RScalarDist const *DPQFunction::dist() const
{
return _dist;
}
bool DPQFunction::checkArgs(vector<double const *> const &args) const
{
vector<double const *> param(_dist->npar());
for (unsigned int i = 0; i < param.size(); ++i) {
param[i] = args[i+1];
}
return _dist->checkParameterValue(param);
}
}

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks