Re: cse326 sorts buggy behavior (fwd)


Subject: Re: cse326 sorts buggy behavior (fwd)
From: Matthew Cary (cary@cs.washington.edu)
Date: Wed Apr 10 2002 - 09:20:01 PDT


Oops, off-by-one error on inputs that are divisible by three. I've
updated projects/sorts.tar.gz; the fix was to change the assertion in the
Incs constructor to

    assert(array[num_incs-1] >= len/3);

This may be easier to do by hand than by downloading a new project and
transfering your code over.

Sorry for any trouble this caused.

Matt

On Tue, 9 Apr 2002, James Nicholas Deibel wrote:

> Matt,
>
> You're more familiar with shell sort and the code than I am. Any idea
> what is happening here?
>
>
> nick deibel
> jdeibel@cs.washington.edu
>
> -- assume nothing is mundane. life is automatically more perplexing.
>
> ---------- Forwarded message ----------
> Date: Tue, 9 Apr 2002 20:27:29 -0700 (PDT)
> Subject: cse326 sorts buggy behavior
>
> Nick,
>
> I've been generating some statistics using sorts, and it's come to my
> attention that sorts fails on the following input:
>
> [347] tahiti:~/courses/CSE326/project1/sorts.working:> randseq -l 120 |
> sorts -l t shell sort: 120 took sorts: main.C:153: Incs::Incs(int):
> Assertion `array[num_in cs-1] > len/3' failed. Abort
>
>
> It does this with a copy of 'sorts' that I haven't touched, so I'm pretty
> sure the problem is on your end.... It doesn't get in my way, but I
> thought you'd like to know.
>



This archive was generated by hypermail 2b25 : Wed Apr 10 2002 - 09:20:21 PDT