I need a function written in vbscript that can sort a multi-dimensional array, evaluate it and categorized/sorted it in a
**ARRAY will be created from a getRow in ADO
**so it will be
i = count
parray(1,i) = item a
parray(2,i) = measurement1,
parray(3,i) = measurement2
The array will have measurements and based on a a tolerance, I need to group them into the new array or sorted:
item_nameA, measurement1, measurement2,measurement3,measuremeant4,measurement5,measurement6
item_nameB, measurement1, measurement2,measurement3,measuremeant4,measurement5,measurement6
item_nameC, measurement1, measurement2,measurement3,measuremeant4,measurement5,measurement6
A 8, 10.75, 7, 10, 8.125, 11
B 8.375, 10.875, 7.375, 10, 8.625, 11.125
C 7.875, 10.875,7, 10, 8.5, 11.125
D 6.875, 14.875,7, 10, 8.5, 11.125
Tolerance could be .5 or .75.. I am measuring in inches so if it is .5 (1/2) off, I need to know this.
if A & B are in within tolerance, it is grouped in the new array
Hence, in the new array
**Group 1:** A,B
**Group 2:** c
**Group 3:** c
GroupArray (0) = A,B
GroupArray (1) = C
GroupArray (2) = D
Note, you will need to convert variants into doubles. cdbl (variant)
So I will need several functions:
1. Check The Tolerance. If the item is not within tolerance, it will be grouped elsewhere
if != tolerance return false
2. Sort Array/ Group Array
3. Create a new array that has the grouping.
You can put the first column in the new array and I can use it as a key to reference the old array.
newarray(0) = item1,item4, item 5
newarray(1) = item2,item10,item16,item30
Assuming I want exact tolerance, so I should get something like
Group 1: item 24,25
Group 2: item 33,33
Attached is the test data and some info.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
4) Tested against test data provided to developer
Windows NT/2000 via ASP or as a Visual Basic Function/Class