From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Aufgabenblatt1/Quantization/src/Quantization.h | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h') diff --git a/Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h new file mode 100644 index 0000000..5939591 --- /dev/null +++ b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h @@ -0,0 +1,45 @@ +/* + * Quantization.h + * + * Created on: 02.04.2011 + * Author: sven + */ + +#ifndef QUANTIZATION_H_ +#define QUANTIZATION_H_ + +#ifndef QUANTIZATIONPARAMETERS_H_ + #include "QuantizationParameters.h" +#endif + +#ifndef _GLIBCXX_VECTOR + #include +#endif + +struct QuantizationRange { + unsigned short mMinValue; + unsigned short mMaxValue; + unsigned short mRangeWidth; + unsigned short mRangeValue; + bool IsInRange(unsigned short val) + { + return ((val >= mMinValue) && (val <= mMaxValue)); + } +}; + +typedef std::vector QuantizationRanges; +typedef std::vector::iterator QuantizationRangesIter; + +class Quantization { +public: + Quantization(QuantizationParameters& params); + virtual ~Quantization(); +private: + QuantizationParameters& mParams; + unsigned mNumQuantizationValues; + QuantizationRanges mQuantizationRanges; + short getQuantizationValue(short); + void calcQuantizationValues(); +}; + +#endif /* QUANTIZATION_H_ */ -- cgit v1.2.3