StochTree
0.5.0.9000
Loading...
Searching...
No Matches
include
stochtree
gamma_sampler.h
1
2
#ifndef STOCHTREE_GAMMA_SAMPLER_H_
3
#define STOCHTREE_GAMMA_SAMPLER_H_
4
5
#include <stochtree/distributions.h>
6
#include <random>
7
8
namespace
StochTree
{
9
10
class
GammaSampler {
11
public
:
12
GammaSampler() {}
13
~GammaSampler() {}
14
double
Sample(
double
a,
double
b, std::mt19937& gen,
bool
rate_param =
true
) {
15
double
scale = rate_param ? 1. / b : b;
16
return
sample_gamma
(gen, a, scale);
17
}
18
};
19
20
}
// namespace StochTree
21
22
#endif
// STOCHTREE_GAMMA_SAMPLER_H_
StochTree
A collection of random number generation utilities.
Definition
bart.h:15
StochTree::sample_gamma
double sample_gamma(std::mt19937 &gen, double shape, double scale)
Definition
distributions.h:193
Generated by
1.15.0