#ifndef _DEMO_CHI2_H #define _DEMO_CHI2_H #include "palisade.h" #include using namespace lbcrypto; using namespace std; namespace mpi = boost::mpi; const double EPSILON = 1.0E-08; void RunChi2(const string &SNPDir, const string &SNPFileName, const string &pValue, const string &Runtime, const string &SampleSize, const string &SNPs, size_t file_start, double &keyGenTime, double &encryptionTime, double &computationTime, double &decryptionTime, double &endToEndTime, CryptoContext &cc, auto &keyPair, int batch_num, mpi::communicator &world); Ciphertext BinaryTreeAdd(std::vector> &vector); void ReadSNPFile(vector& headers, std::vector> & dataColumns, std::vector &y, string dataFileName, size_t N, size_t M, size_t from); double normalCFD(double value) { return 0.5 * erfc(-value * M_SQRT1_2); } double sf(double value) { return 1 - normalCFD(value); } double IncompleteGamma(double val, double p); #endif //demo-chi2.h