nk
1.0.0
C++ Numerical Computing Runtime
Toggle main menu visibility
Loading...
Searching...
No Matches
exponential.hpp
Go to the documentation of this file.
1
3
// toolboxes/stats/include/nk/stats/distributions/exponential.hpp
4
//
5
// Exponential distribution. Parameterized by the MEAN μ
6
// (NOT the rate λ): f(x; μ) = exp(-x/μ) / μ. Special case Gamma(1, μ).
7
8
#pragma once
9
10
#include <memory_resource>
11
#include <nk/value/value.hpp>
12
13
#include <tuple>
14
15
namespace
nk {
16
19
namespace
ops {
class
RngContext
; } }
20
21
namespace
nk::stats {
22
33
Value
exppdf
(
const
Value
&x,
double
mu, std::pmr::memory_resource *mr =
nullptr
);
34
44
Value
expcdf
(
const
Value
&x,
double
mu, std::pmr::memory_resource *mr =
nullptr
);
45
55
Value
expinv
(
const
Value
&p,
double
mu, std::pmr::memory_resource *mr =
nullptr
);
56
67
Value
exprnd
(
::nk::ops::RngContext
&rng,
double
mu,
size_t
rows = 1,
size_t
cols = 1, std::pmr::memory_resource *mr =
nullptr
);
68
76
std::tuple<double, double>
expstat
(
double
mu);
77
78
80
}
// namespace nk::stats
nk::Value
Core MATLAB-compatible multidimensional array and scalar value type.
Definition
value.hpp:61
nk::ops::RngContext
Definition
rng_context.hpp:29
nk::stats::expcdf
Value expcdf(const Value &x, double mu, std::pmr::memory_resource *mr=nullptr)
Exponential cdf (F = expcdf(x, mu)).
nk::stats::expinv
Value expinv(const Value &p, double mu, std::pmr::memory_resource *mr=nullptr)
Exponential inverse cdf (x = expinv(p, mu)).
nk::stats::exprnd
Value exprnd(::nk::ops::RngContext &rng, double mu, size_t rows=1, size_t cols=1, std::pmr::memory_resource *mr=nullptr)
Exponential random samples (r = exprnd(mu, rows, cols)).
nk::stats::exppdf
Value exppdf(const Value &x, double mu, std::pmr::memory_resource *mr=nullptr)
Exponential pdf (y = exppdf(x, mu)).
nk::stats::expstat
std::tuple< double, double > expstat(double mu)
Exponential mean and variance ([m, v] = expstat(mu)).
src
toolboxes
stats
include
nk
stats
distributions
exponential.hpp
Generated by
1.17.0