|
TrdMCClusterR Fit Classifier
|
Functions | |
| double | sumVector (const std::vector< double > &v) |
| template<typename T > | |
| void | printVector (const std::vector< T > &v) |
| void | printVectorOfVectors (std::vector< std::vector< double >> const &mat) |
| std::map< int, int > | GetUniqueElementsAndFrequency (const std::vector< int > &vec) |
| void | filterAndShrinkMap (std::map< int, int > &frequencyMap, int threshold=2) |
| template<typename T > | |
| bool | areAllElementsEqual (const std::vector< T > &vec) |
| int | getMajorityElement (const std::vector< int > &vec) |
| int | countDifferentFromMajority (const std::vector< int > &vec) |
| std::vector< double > | TVectorDToStdVector (const TVectorD &vec) |
| bool | AreVectorsEqual (const std::vector< double > &vec1, const std::vector< double > &vec2, double tol=1e-4) |
| bool VectorUtilities::areAllElementsEqual | ( | const std::vector< T > & | vec | ) |

| bool VectorUtilities::AreVectorsEqual | ( | const std::vector< double > & | vec1, |
| const std::vector< double > & | vec2, | ||
| double | tol = 1e-4 |
||
| ) |

| int VectorUtilities::countDifferentFromMajority | ( | const std::vector< int > & | vec | ) |


| void VectorUtilities::filterAndShrinkMap | ( | std::map< int, int > & | frequencyMap, |
| int | threshold = 2 |
||
| ) |
Shrinking the map by swapping with a temporary copy.

| int VectorUtilities::getMajorityElement | ( | const std::vector< int > & | vec | ) |
Count the frequency of each element in the vector
Find the majority element

| std::map<int, int> VectorUtilities::GetUniqueElementsAndFrequency | ( | const std::vector< int > & | vec | ) |

| void VectorUtilities::printVector | ( | const std::vector< T > & | v | ) |

| void VectorUtilities::printVectorOfVectors | ( | std::vector< std::vector< double >> const & | mat | ) |
useful for debugging; printing out particle vector of vectors to terminal

| double VectorUtilities::sumVector | ( | const std::vector< double > & | v | ) |
function to find sum of all elements in a vector. https://stackoverflow.com/questions/3221812/how-to-sum-up-elements-of-a-c-vector/3221813#3221813
| std::vector<double> VectorUtilities::TVectorDToStdVector | ( | const TVectorD & | vec | ) |
