[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.
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.
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
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.
Re: Need a smart person to fix this algorithm
Quote:
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.