diff options
Diffstat (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h')
| -rw-r--r-- | Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h | 45 |
1 files changed, 45 insertions, 0 deletions
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 <vector> +#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<QuantizationRange*> QuantizationRanges; +typedef std::vector<QuantizationRange*>::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_ */ |
