summaryrefslogtreecommitdiffstats
path: root/Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h')
-rw-r--r--Master/Modellbildung_und_Simulation/Aufgabenblatt1/Quantization/src/Quantization.h45
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_ */