1 #ifndef FLASHHYPOTHESIS_H 2 #define FLASHHYPOTHESIS_H 28 std::vector<float>
const& vector_error = std::vector<float>())
46 std::vector<float> err = std::vector<float>(0));
61 return std::sqrt(std::inner_product(
67 void Normalize(
float const& totalPE_target);
75 throw std::runtime_error(
76 "ERROR in FlashHypothesisAddition: Cannot add hypothesis of different size");
81 flashhyp._NPEs_ErrorVector[i] =
105 SetPromptAndLateHyp(prompt, late);
110 _prompt_hyp = prompt;
114 void SetTotalHypAndPromptFraction(
const FlashHypothesis& total,
float frac);
115 void SetPromptHypAndPromptFraction(
const FlashHypothesis& prompt,
float frac);
134 throw std::runtime_error(
135 "ERROR in FlashHypothesisCollectionAddition: Cannot add hypothesis of different size");
151 void CheckFrac(
float f);
152 void UpdateTotalHyp();
void SetHypothesisVectorAndErrorVector(std::vector< float > v, std::vector< float > err=std::vector< float >(0))
FlashHypothesis(size_t s)
size_t GetVectorSize() const
void SetPromptAndLateHyp(const FlashHypothesis &prompt, const FlashHypothesis &late)
FlashHypothesisCollection()
FlashHypothesis(std::vector< float > const &vector, std::vector< float > const &vector_error=std::vector< float >())
float GetTotalPEsError() const
std::vector< float > _NPEs_ErrorVector
std::vector< float > const & GetHypothesisErrorVector() const
const FlashHypothesis & GetLateHypothesis() const
void SetHypothesisAndError(size_t i_opdet, float pe, float err=-999)
FlashHypothesisCollection operator+(const FlashHypothesisCollection &fhc)
float GetTotalPEs() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
float const & GetHypothesisError(size_t i_opdet) const
void SetHypothesisError(size_t i_opdet, float err)
FlashHypothesis _prompt_hyp
const FlashHypothesis & GetPromptHypothesis() const
FlashHypothesis _total_hyp
float GetLateFraction() const
std::vector< float > _NPEs_Vector
FlashHypothesis operator+(const FlashHypothesis &fh)
FlashHypothesisCollection(const FlashHypothesis &prompt, const FlashHypothesis &late)
float const & GetHypothesis(size_t i_opdet) const
void Normalize(float const &totalPE_target)
void SetHypothesis(size_t i_opdet, float pe)
const FlashHypothesis & GetTotalHypothesis() const
void SetHypothesisErrorVector(std::vector< float > v)
size_t GetVectorSize() const
FlashHypothesisCollection(size_t s)
FlashHypothesis _late_hyp
std::vector< float > const & GetHypothesisVector() const
void SetHypothesisVector(std::vector< float > v)
float GetPromptFraction() const