8#include <boost/math/distributions/chi_squared.hpp>
9#include <boost/math/distributions/inverse_chi_squared.hpp>
10#include <boost/math/distributions/non_central_chi_squared.hpp>
23 std::vector<unsigned char>
Key;
24 std::vector<unsigned int>
Count;
48 TableEntryStruct(
unsigned int, std::vector<unsigned char>&,
unsigned int,
unsigned int);
71 std::vector<std::vector<std::vector<std::vector<unsigned char>>>>
OnlyOneEntry;
double EndClock(timespec &)
void GTest(unsigned int, unsigned int, ContingencyTableStruct &, std::vector< double >)
Computes the p-value.
void StartClock(timespec &)
double GetGValue(unsigned int, unsigned int, ContingencyTableStruct &, std::vector< double >, unsigned int, unsigned int &)
Computes the G-value.
Defines a contingency table.
double Probability
The false-positive probability computed with the G-test.
unsigned int Traces
The number of traces required to achieve a desired confidence level computed via statistical power an...
std::vector< std::vector< std::vector< std::vector< unsigned char > > > > OnlyOneEntry
Stores all entires that occurred only once.
std::vector< TableEntryStruct > Entries
Different entries of a contingency table, i.e. one entry per sample.
void CalculateTraces(int, double, double)
Computes the required number of traces.
Defines one entry of a contingency table.
TableEntryStruct(unsigned int)
Initializes a new entry without fixed state and zero counts.
std::vector< unsigned char > Key
The probed state of the cell, i.e. a byte-wise n-bit value recorded by n probes of a probing set.
std::vector< unsigned int > Count
Counts how often state state was probed for each user-defined group.
TableEntryStruct(unsigned int, std::vector< unsigned char > &, unsigned int, unsigned int)
Initializes a new entry with fixed state and counts.