21 #include <type_traits> 24 namespace alps {
namespace alea {
26 template <
typename T,
typename InResult>
31 "Result and transform types are mismatched");
37 res.
store().data() = tf(in.mean());
38 res.
store().count() = in.count();
44 template <
typename T,
typename InResult>
50 "Result and transform types are mismatched");
57 dx = 0.125 *
std::abs(in.stderror().mean());
61 double batch_size = in.count2() / in.count();
63 res.
store().data() = tf(in.mean());
64 res.
store().data2() = jac * in.cov()/batch_size * jac.adjoint();
65 res.
store().count() = in.count();
66 res.
store().count2() = in.count2();
72 template <
typename T,
typename InResult>
78 "Result and transform types are mismatched");
85 dx = 0.125 *
std::abs(in.stderror().mean());
89 double batch_size = in.count2() / in.count();
91 res.
store().data() = tf(in.mean());
92 res.
store().data2() = jac * in.var().asDiagonal()/batch_size * jac.adjoint();
93 res.
store().count() = in.count();
94 res.
store().count2() = in.count2();
100 template <
typename T>
eigen< T >::matrix jacobian(const transformer< T > &f, column< T > x, double dx)
batch_data< T > jackknife(const batch_data< T > &in, const transformer< T > &tf)
boost::array< T, N > abs(boost::array< T, N > arg)
const mean_data< T > & store() const
mean_result< T > transform(no_prop, const transformer< T > &tf, const InResult &in)
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > matrix
const batch_data< T > & store() const
const cov_data< T, Strategy > & store() const