Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::LArDiscreteProbabilityHelper Class Reference

LArDiscreteProbabilityHelper class. More...

#include "LArDiscreteProbabilityHelper.h"

Public Member Functions

template<>
DiscreteProbabilityVector MakeRandomisedSample (const DiscreteProbabilityVector &t, std::mt19937 &randomNumberGenerator)
 
template<>
unsigned int GetSize (const DiscreteProbabilityVector &t)
 
template<>
float GetElement (const DiscreteProbabilityVector &t, const unsigned int index)
 

Static Public Member Functions

template<typename T >
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.
 
template<typename T >
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 student T dist.
 
template<typename T >
static float CalculateCorrelationCoefficient (const T &t1, const T &t2)
 Calculate the correlation coefficient between two datasets.
 
template<typename T >
static float CalculateMean (const T &t)
 Calculate the mean of a dataset.
 

Static Private Member Functions

template<typename T >
static T MakeRandomisedSample (const T &t, std::mt19937 &randomNumberGenerator)
 Make a randomised copy of a dataset.
 
template<typename T >
static std::vector< T > MakeRandomisedSample (const std::vector< T > &t, std::mt19937 &randomNumberGenerator)
 Make a randomised copy of dataset (dataset is an std::vector)
 
template<typename T >
static unsigned int GetSize (const T &t)
 Get the size the size of a dataset.
 
template<typename T >
static unsigned int GetSize (const std::vector< T > &t)
 Get the size of a dataset (dataset is an std::vector)
 
template<typename T >
static float GetElement (const T &t, const unsigned int index)
 Get an element in a dataset.
 
template<typename T >
static float GetElement (const std::vector< T > &t, const unsigned int index)
 Get an element in a dataset (dataset is an std::vector)
 

Detailed Description

Member Function Documentation

◆ CalculateCorrelationCoefficient()

template<typename T >
template float lar_content::LArDiscreteProbabilityHelper::CalculateCorrelationCoefficient ( const T &  t1,
const T &  t2 
)
static

Calculate the correlation coefficient between two datasets.

Parameters
t1the first input dataset
t2the second input dataset
Returns
the correlation coefficient

Definition at line 74 of file LArDiscreteProbabilityHelper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateCorrelationCoefficientPValueFromPermutationTest()

template<typename T >
template float lar_content::LArDiscreteProbabilityHelper::CalculateCorrelationCoefficientPValueFromPermutationTest ( const T &  t1,
const T &  t2,
std::mt19937 &  randomNumberGenerator,
const unsigned int  nPermutations 
)
static

Calculate P value for measured correlation coefficient between two datasets via a permutation test.

Parameters
t1the first input dataset
t2the second input dataset
randomNumberGeneratorthe random number generator to shuffle the datasets
nPermutationsthe number of permutations to run
Returns
the p-value

Definition at line 16 of file LArDiscreteProbabilityHelper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateCorrelationCoefficientPValueFromStudentTDistribution()

template<typename T >
template float lar_content::LArDiscreteProbabilityHelper::CalculateCorrelationCoefficientPValueFromStudentTDistribution ( const T &  t1,
const T &  t2,
const unsigned int  nIntegrationSteps,
const float  upperLimit 
)
static

Calculate P value for measured correlation coefficient between two datasets via a integrating the student T dist.

Parameters
t1the first input dataset
t2the second input dataset
nIntegrationStepshow many steps to use in the trapezium integration
upperLimitthe upper limit of the integration
Returns
the p-value

Definition at line 41 of file LArDiscreteProbabilityHelper.cc.

Here is the call graph for this function:

◆ CalculateMean()

template<typename T >
template float lar_content::LArDiscreteProbabilityHelper::CalculateMean ( const T &  t)
static

Calculate the mean of a dataset.

Parameters
tthe dataset
Returns
the mean

Definition at line 112 of file LArDiscreteProbabilityHelper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElement() [1/3]

template<>
float lar_content::LArDiscreteProbabilityHelper::GetElement ( const DiscreteProbabilityVector t,
const unsigned int  index 
)
inline

Definition at line 180 of file LArDiscreteProbabilityHelper.h.

Here is the call graph for this function:

◆ GetElement() [2/3]

template<typename T >
float lar_content::LArDiscreteProbabilityHelper::GetElement ( const std::vector< T > &  t,
const unsigned int  index 
)
inlinestaticprivate

Get an element in a dataset (dataset is an std::vector)

Parameters
tthe std::vector dataset
indexthe index of the element
Returns
the std::vector-based dataset element

Definition at line 174 of file LArDiscreteProbabilityHelper.h.

◆ GetElement() [3/3]

template<typename T >
static float lar_content::LArDiscreteProbabilityHelper::GetElement ( const T &  t,
const unsigned int  index 
)
staticprivate

Get an element in a dataset.

Parameters
tthe dataset
indexthe index of the element
Returns
the dataset element
Here is the caller graph for this function:

◆ GetSize() [1/3]

template<>
unsigned int lar_content::LArDiscreteProbabilityHelper::GetSize ( const DiscreteProbabilityVector t)
inline

Definition at line 166 of file LArDiscreteProbabilityHelper.h.

Here is the call graph for this function:

◆ GetSize() [2/3]

template<typename T >
unsigned int lar_content::LArDiscreteProbabilityHelper::GetSize ( const std::vector< T > &  t)
inlinestaticprivate

Get the size of a dataset (dataset is an std::vector)

Parameters
tthe std::vector dataset
Returns
the std::vector-based dataset size

Definition at line 160 of file LArDiscreteProbabilityHelper.h.

◆ GetSize() [3/3]

template<typename T >
static unsigned int lar_content::LArDiscreteProbabilityHelper::GetSize ( const T &  t)
staticprivate

Get the size the size of a dataset.

Parameters
tthe dataset
Returns
the dataset size
Here is the caller graph for this function:

◆ MakeRandomisedSample() [1/3]

template<>
DiscreteProbabilityVector lar_content::LArDiscreteProbabilityHelper::MakeRandomisedSample ( const DiscreteProbabilityVector t,
std::mt19937 &  randomNumberGenerator 
)
inline

Definition at line 152 of file LArDiscreteProbabilityHelper.h.

◆ MakeRandomisedSample() [2/3]

template<typename T >
std::vector< T > lar_content::LArDiscreteProbabilityHelper::MakeRandomisedSample ( const std::vector< T > &  t,
std::mt19937 &  randomNumberGenerator 
)
inlinestaticprivate

Make a randomised copy of dataset (dataset is an std::vector)

Parameters
tthe std::vector-based dataset to be shuffled
randomNumberGeneratorthe random number generator
Returns
the reshuffled std::vector

Definition at line 143 of file LArDiscreteProbabilityHelper.h.

◆ MakeRandomisedSample() [3/3]

template<typename T >
static T lar_content::LArDiscreteProbabilityHelper::MakeRandomisedSample ( const T &  t,
std::mt19937 &  randomNumberGenerator 
)
staticprivate

Make a randomised copy of a dataset.

Parameters
tthe dataset to be shuffled
randomNumberGeneratorthe random number generator
Returns
the reshuffled dataset
Here is the caller graph for this function:

The documentation for this class was generated from the following files: