Results 1 to 5 of 5

Thread: [RESOLVED] Need a smart person to fix this algorithm

  1. #1

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    Resolved [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.

  2. #2

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    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.

  3. #3
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    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.

  4. #4
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    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.

  5. #5

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width