Paolo Veronelli wrote:
> Quoting Paolo Veronelli <[EMAIL PROTECTED]>:
>> I paste new version in case you care give me some moe suggestion.
>
>
>
> import Data.Maybe
> import Data.List
> import Data.Array.Diff
>
> import System.Environment
> import Control.Arrow
> import Control.Monad
>
> impo
Quoting Paolo Veronelli <[EMAIL PROTECTED]>:
> I paste new version in case you care give me some moe suggestion.
import Data.Maybe
import Data.List
import Data.Array.Diff
import System.Environment
import Control.Arrow
import Control.Monad
import Random
inc l i = l // [(i,l!i + 1)]
switch l
Quoting Udo Stenzel <[EMAIL PROTECTED]>:
> [EMAIL PROTECTED] wrote:
>
> It isn't, but not for the reasons you might suspect. You're using
> 'nub', which is quadratic, and your 'coupage' is also quadratic because
> it uses 'lookup' on a list, which is linear, a linear number of times.
> You can ge
[EMAIL PROTECTED] wrote:
> I'm timing the following script.I'm not expert to evaluate th O'ness
> of this code, I hope someone can do it. The program clusters n
> integers in m buckets based on their distance. Anyway I thing should
> be linear.So I timed som executions changing the first arg.
> [
Good year everyone.
I'm timing the following script.I'm not expert to evaluate th O'ness of this
code, I hope someone can do it.
The program clusters n integers in m buckets based on their distance.
Anyway I thing should be linear.So I timed som executions changing the first
arg.
First argument