Added function for calculating centroid of the cells using the coordinate
of the base of the post
Added function to calculating the D-Region as seen on Ryan's picture. The
D-region is 4 points in up, down, left, right that is closest to the
centroid.
Added more details in the comment for dRegion function
added  module1-4 to backup file and easy track text file
added partition function on module 4, working on swap and quicksort
added swap function to module 4
added function quicksort
fix some syntax mistake with the previous function
TODO: need to add function pickpivot and test quicksort
added pick pivot function
Module 4: `Added one test for quicksort
module3: add test for centroid, change centroid to centroidCal and bug fix
in centroidCal function
module3: changed the documentation for d-region
module4: changed quicksort to a function sub that modify both a array needed to be sorted and its index array
    tested new quicksort

Signed-off-by: andy <dephiros@gmail.com>
module4: finished the dregion function. Have not tested
module3: Remove all previous debug.print in dregion
         add debug.print to print the distance array index and result
module4:remove all debug.print
module3:Remove all debug.print
 make centroid index to be 1,2 instead of 0,1
 fix some error in calculating centroid
 fix some error in calculating distance to centroid in dregion
 remove assignRegion skeleton, replace with region
 remove testCentroid and replace with testRegion
 add region function that accept a region count array, a region array, worksheet result. The function will call dregion, a region....
 TODO: fix out-of-stack problem
module4:remove all debug.print
module3:Remove all debug.print
 make centroid index to be 1,2 instead of 0,1
 fix some error in calculating centroid
 fix some error in calculating distance to centroid in dregion
 remove assignRegion skeleton, replace with region
 remove testCentroid and replace with testRegion
 add region function that accept a region count array, a region array, worksheet result. The function will call dregion, a region....
 TODO: fix out-of-stack problem
module4:remove all debug.print
module 3: fix an error where centrodCal will not calculate the sum of all the
coordinate
    return all the function call to normal
    TODO:will switch from quicksort algorithm to sort by output to spreadsheet

module 4: added another quicksort test. Confirm that quick sort is not
suitable for some random double number. Need to look more at
http://www.cpearson.com/excel/SortingArrays.aspx
module4: change from quicksort to sort via worksheet
http://www.cpearson.com/excel/SortingArrays.aspx
module3: change from using quicksort to sort via worksheet
module3: set the reg_count in dregion to be oneThird
mark the ind(i) to -1 after it is already assigned to regionD
change dregion to regionD
ind is now declared in region instead of in regionD. Can be used to keep track of which has been assigned a region.
module3:
Added regionA sub
Have regionD returns the boundary of the regionD (smallestx, smallesty, biggestx, biggest y)
added initialization of reg_count in region
added region E which is similar to region A but contain top right and bottom right posts
added regionB sub, region B is post that are to the left of reigonD but are not in regionA
Change the size of reg to 6 columns and reg_count to 6 rows
Change the row size of reg to 1/2 number of the total post
Added regionC sub, region C is leftover from all other region
Added regionF sub, region F is posts that are to the right of reigonD but are not in region E
The total post number is matched with the total post number in all region
module2: remove prepareForce
module1: Turn off screenupdating to run faster and turn off display alert while deleting sheet
module3: add writeRegion function for writing region to a worksheet for graphing purpose
module 2: remove gridline from the graph by editting formatGraph