Signature | Description | Parameters |
---|---|---|
template<typename T, typename I = unsigned long, typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> struct CorrVisitor; |
This functor class calculates the correlation of two given columns.explicit CorrVisitor (bool bias = true);See this document and dataframe_tester.cc for examples. |
T: Column data type. T must be an arithmetic-enabled type I: Index type. |
std::cout << "\nTesting Correlation Visitor ..." << std::endl; CorrVisitor<double> corr_visitor; auto fut10 = df.visit_async<double, double>("dbl_col", "dbl_col_2", corr_visitor); const double corr = fut10.get().get_result(); assert(fabs(corr - -0.358381) < 0.000001);