MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: List complement operator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85086] Re: List complement operator
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Sun, 27 Jan 2008 05:50:47 -0500 (EST)
  • Organization: University of Bergen
  • References: <fn1ndi$97t$1@smc.vnet.net> <fn21s3$irs$1@smc.vnet.net> <fneson$i6c$1@smc.vnet.net>

zac wrote:
> I'm extremely sorry to post my code with undefined function RDI.
> RDI[x] is simply my shorthand version of Random[Integer, {1, x}],
> which is defined by a package I use all the time. I hope it clears
> everything.

With this specific input (very few different elements, 10 in your 
example), you can get a massive (more than 10x) speed boost from changing

u = Union[a, b]

in my version to

u = Sort[Tally[Join[a,b]][[All, 1]]]

(I mentioned this possibility in another message.)

But it still won't be nearly as fast as Oleksandr Pavlyk's version.

Szabolcs


  • Prev by Date: Shortcut for Changing the Active Notebook in Windows version of
  • Next by Date: Re: Sticky Animations Anyone?
  • Previous by thread: Re: List complement operator
  • Next by thread: Re: List complement operator