diff src/DynamicVector.h @ 4:4a8e6a6cd224

optimised draw function in dynamic vector class. Added Gaussian lookup but not yet used.
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 19 Aug 2011 15:53:04 +0100
parents 5581023e0de4
children 75dcd1308658
line wrap: on
line diff
--- a/src/DynamicVector.h	Fri Aug 19 02:36:34 2011 +0100
+++ b/src/DynamicVector.h	Fri Aug 19 15:53:04 2011 +0100
@@ -14,6 +14,7 @@
 
 #ifndef _DYNAMIC_VECTOR
 #define _DYNAMIC_VECTOR
+#define GAUSSIAN_LOOKUP_LENGTH 1000000
 
 class DynamicVector{
 public:
@@ -26,6 +27,11 @@
 	DoubleVector array;
 	double getMaximum();
 	double getIntegratedEstimate();
+	double getLookupIndex(const int& i, const double& mean, const double& StdDev);
+	void addGaussianShapeByLookupTable(double& mean, double& StdDev, double& factor);
+	double gaussianLookupTable[GAUSSIAN_LOOKUP_LENGTH];
+	double gaussianLookupMean, gaussianLookupStdDev;
+	
 	
 	void drawVector(const int& minIndex, const int& maxIndex);
 	void drawConstrainedVector(const int& minIndex, const int& maxIndex, const int& minScreenIndex, const int& maxScreenIndex);