aboutsummaryrefslogtreecommitdiffstats
path: root/src/stratified_sampling.hpp
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2016-04-13 11:34:19 -0400
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2016-04-13 11:34:19 -0400
commit28fe184f2fea5031f352cf73fc30b99b5cde8f6f (patch)
tree5b5e40c800c5648da44f6cf70ebde8ecb6110723 /src/stratified_sampling.hpp
parent4e5104a0186bd705b5ed1f57f73375ace60587f6 (diff)
downloadprojet_C++-28fe184f2fea5031f352cf73fc30b99b5cde8f6f.tar.gz
replace unary_function by function
Diffstat (limited to 'src/stratified_sampling.hpp')
-rw-r--r--src/stratified_sampling.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stratified_sampling.hpp b/src/stratified_sampling.hpp
index 9175f75..1ab1126 100644
--- a/src/stratified_sampling.hpp
+++ b/src/stratified_sampling.hpp
@@ -3,6 +3,7 @@
#include <iostream>
#include "var_alea.hpp"
#include <gsl/gsl_cdf.h>
+#include <functional>
using namespace std;
@@ -180,7 +181,7 @@ pair<double,double> stratified_sampling<L>::estimator() const {
}
template <typename Fct>
-struct exponential_tilt : public std::unary_function<std::vector<double>, double>
+struct exponential_tilt : public std::function<double(std::vector<double>)>
{
exponential_tilt(std::vector<double> mu, Fct f) : mu(mu), f(f){
norm_mu = 0;