|
-
May 11th, 2008, 06:07 PM
#1
[RESOLVED] Need a smart person to fix this algorithm
Take a look at the smooth sort algorithm in this project. First person to fix the bug gets a credit in the final program.
For more information on the problem, double-click the smooth sort algorithm from the main screen.
The best way to reproduce the errant behavior is to isolate smooth sort. From the main screen, click on smooth sort to highlight it, then click the filter button on the toolbar. Do a regular shuffle and then watch it sort. You'll probably want to kick the speed all the way up using the slider in the statusbar.
The algorithm code is in the module basGraphical.bas.
Please don't make me debug it myself; I still haven't written the benchmark part.
Last edited by Ellis Dee; May 12th, 2008 at 09:12 AM.
-
May 11th, 2008, 06:08 PM
#2
Re: Need a smart person to fix this algorithm
And while we're at it, I need the same kind of help for shear sort.
-
May 12th, 2008, 03:00 AM
#3
Re: Need a smart person to fix this algorithm
Any chance you can post the original Java? The link in your project doesn't work.
Edit: Ok, I've found it at the end of one of he modules. I'll take a closer look
Last edited by Doogle; May 12th, 2008 at 03:12 AM.
-
May 12th, 2008, 05:43 AM
#4
Re: Need a smart person to fix this algorithm
Ok, I've found an error and it seems to work now.
In module basGraphical, subroutine SmoothTrinkle:
Code:
If plngArray(r3) >= plngArray(r2) Then
Exchange R, r3
R = r3
Else
Exchange R, r2
R = r2 ' You were missing this assignment
SmoothDown b, c
p = 0
End If
It looks as if you made a transcription error when converting from the java.
-
May 12th, 2008, 09:10 AM
#5
Re: Need a smart person to fix this algorithm
 Originally Posted by Doogle
Ok, I've found an error and it seems to work now.
It looks as if you made a transcription error when converting from the java.
Dude, you totally rock. I'm crediting you in the code.
Thanks a million.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|