 	import weave.utils.VectorUtils;
 	
 	/**
-	 * Implemented from Doug Curl (javascript) and Daniel J Lewis (python implementation) and  Simon Georget (Geostats)
+	 * Implemented from https://gist.github.com/tmcw/4977508
+	 * Also, read : http://macwright.org/2013/02/18/literate-jenks.html
+	 * Other implementations from Doug Curl (javascript) and Daniel J Lewis (python implementation) and  Simon Georget (Geostats)
 	 * http://www.arcgis.com/home/item.html?id=0b633ff2f40d412995b8be377211c47b
 	 * http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/
 	 * https://github.com/simogeo/geostats/blob/master/lib/geostats.js

			return 1;
		}
		
		private function _iterateSortedKeys(returnTime:int):Number
		{
			// wait for sort to complete

				kClass.push(0);
			}
			
			// the calculation of classes will never include the upper and
			// lower bounds, so we need to explicitly set them
			kClass[countNum] = _sortedValues[_sortedValues.length -1];
			
			kClass[0] = _sortedValues[0];
			
			
			// the lower_class_limits matrix is used as indexes into itself
			// here: the `kClassCount` variable is reused in each iteration.
			while (countNum >=2)
			{
				var id:Number = _lower_class_limits[kClassCount][countNum] -2;
				kClass[countNum -1] = _sortedValues[id];
				kClassCount = _lower_class_limits[kClassCount][countNum] -1;
				countNum --;
			}
			
