8 #ifndef LAR_DISCRETE_PROBABILITY_HELPER_HELPER_H 9 #define LAR_DISCRETE_PROBABILITY_HELPER_HELPER_H 1 37 const T &
t1,
const T &
t2, std::mt19937 &randomNumberGenerator,
const unsigned int nPermutations);
51 const T &t1,
const T &t2,
const unsigned int nIntegrationSteps,
const float upperLimit);
95 static std::vector<T>
MakeRandomisedSample(
const std::vector<T> &t, std::mt19937 &randomNumberGenerator);
104 template <
typename T>
105 static unsigned int GetSize(
const T &t);
114 template <
typename T>
115 static unsigned int GetSize(
const std::vector<T> &t);
125 template <
typename T>
126 static float GetElement(
const T &t,
const unsigned int index);
136 template <
typename T>
137 static float GetElement(
const std::vector<T> &t,
const unsigned int index);
142 template <
typename T>
145 std::vector<T> randomisedVector(t);
146 std::shuffle(randomisedVector.begin(), randomisedVector.end(), randomNumberGenerator);
148 return randomisedVector;
159 template <
typename T>
173 template <
typename T>
176 return static_cast<float>(t.at(index));
187 #endif // #ifndef LAR_DISCRETE_PROBABILITY_HELPER_H
DiscreteProbabilityVector class.
static float CalculateCorrelationCoefficientPValueFromPermutationTest(const T &t1, const T &t2, std::mt19937 &randomNumberGenerator, const unsigned int nPermutations)
Calculate P value for measured correlation coefficient between two datasets via a permutation test...
static float CalculateCorrelationCoefficientPValueFromStudentTDistribution(const T &t1, const T &t2, const unsigned int nIntegrationSteps, const float upperLimit)
Calculate P value for measured correlation coefficient between two datasets via a integrating the stu...
static float CalculateCorrelationCoefficient(const T &t1, const T &t2)
Calculate the correlation coefficient between two datasets.
float GetProbability(const unsigned int index) const
Get the probability value of the element in the vector.
Header file for the lar discrete probability vector class.
static T MakeRandomisedSample(const T &t, std::mt19937 &randomNumberGenerator)
Make a randomised copy of a dataset.
static unsigned int GetSize(const T &t)
Get the size the size of a dataset.
static float CalculateMean(const T &t)
Calculate the mean of a dataset.
static float GetElement(const T &t, const unsigned int index)
Get an element in a dataset.
unsigned int GetSize() const
Get the size of the probability vector.
LArDiscreteProbabilityHelper class.