Important alert: (current site time 5/25/2013 3:12:11 PM EDT)
 

winzip icon

Array-handling/sorting

Email
Submitted on: 6/23/2001 6:54:11 PM
By: Philippe Lord  
Level: Intermediate
User Rating: By 18 Users
Compatibility: VB 5.0, VB 6.0
Views: 13394
 
     Pack of 68 VB functions that takes care of handling arrays and sorting them. There is virtually everything you could ask for on that domain. All possible code optimisations have been included into it. Hope you enjoy it.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
6/24/2001 2:23:40 AMPhilippe Lord

Could anyone say if he likes it or not ? plz. I've tested and benchmarked all of theses functions to get the maximum efficiency from them. I'd like to know any criticism on them.
(If this comment was disrespectful, please report it.)

 
6/24/2001 11:51:21 AMJC

Philippe,

As a computer science student, I appreciate seeing this kind of coding examples on PSC. Anyone interested in learning programming should download and study this code. Thanks!
(If this comment was disrespectful, please report it.)

 
6/24/2001 6:56:10 PMme!

If I ever get stumped on working on an array, I'll know where to turn. Good commenting, and great for those not familiar with how powerful and fast using arrays can be.
(If this comment was disrespectful, please report it.)

 
6/25/2001 8:40:08 PMPhilippe Lord

Cool, just noticed I had 3 votes for it, 3x 5 stars :)
thx everyone, I really appreciate it.
(If this comment was disrespectful, please report it.)

 
6/28/2001 10:51:52 AMAnton Knieriemen

Whoa. Hey you've got some fast routines here just by the look of your use of copymemory to blast the arrays around.
Big 5 and I am not even going to bechmark them.
(If this comment was disrespectful, please report it.)

 
6/28/2001 7:01:35 PMPhilippe Lord

thx a lot Knieriemen.
But conserning benchmarks and speed, I may pull out an update pretty soon, as I discovered i could do a faster implementation of ShellSortString and (the most important since its gonna be about 2x-5x faster) SynchroniseIndexedStringArray.
But this is limited to an update of this module. There is another subject i've recently been conserned about. I've been looking for the fastest sort algorithm, but I soon realized there wasn't one that's over all of them, because for each thing to sort the results will be different from one sort to another, hence, there's no perfect sort algorithm. But there's some hope ;)
In this module there's a ShellSort algorithm, which BTW is a pretty good all-around sort algorithm, not so dependent of the size, the lenght, or the approximate-sort of the array. But, I've done some research on the net, and came up to a really impressive sort algorithm.... (read nxt msg)
(If this comment was disrespectful, please report it.)

 
6/28/2001 7:01:50 PMPhilippe Lord

It's a 3-median QuickSort algorithm COMBINED with an InsertionSort when below 4. Let me tell you that it's FAST. Anyway, expect this to be posted today or tomorrow.
(If this comment was disrespectful, please report it.)

 
11/11/2001 4:31:18 PMAndy

I am getting an error using the sorting command ShellSortAny I have a multi dimensional array, and am trying to sort it. I just use the funcion, and then in the InsertionSortAny sub, I get an error saying subscript out of range on the line that reads 'vTemp = vArray(i)'. I am assuming that it is something that I am doing wrong, I would just like to know what. If you could please help me. E-Mail: Andy@brattas.com Thanks
(If this comment was disrespectful, please report it.)

 
8/6/2002 7:51:03 PMBryan Boettcher

Hey man, great work. I used this routine to quicksort an array of 1.2 million elements in a little under 10 seconds (on a P4 1.6GHz). This is nearing QuickSort speeds in C++!

I appreciate you sharing this with PSC. If it's ok with you, I'd like to turn this into a class module, please contact me about that.
(If this comment was disrespectful, please report it.)

 
10/16/2002 9:42:35 PM

thanks for the bas... this is one hell of a catch
(If this comment was disrespectful, please report it.)

 
2/15/2004 7:51:33 PMJohn D. Blakeney

Awesome collection of array procedures. This will save me lots of time. Thank you.
(If this comment was disrespectful, please report it.)

 
10/25/2004 8:13:40 PM110100100

Very cool. Thanks.
(If this comment was disrespectful, please report it.)

 
10/25/2004 10:23:33 PMJ. Berz

Realy great job, dude! THX & 5 globes!
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.