DeleteDuplicates is too slow?
- To: mathgroup at smc.vnet.net
- Subject: [mg107150] DeleteDuplicates is too slow?
- From: "Zeringue, Clint M Civ USAF AFMC AFRL/RDLAF" <Clint.Zeringue at kirtland.af.mil>
- Date: Thu, 4 Feb 2010 06:26:02 -0500 (EST)
Hello,
Suppose you have the following.
Data = RandomReal[1,{N,2}];
sameQ[_,_]=False;
sameQ[{x_,y_},{x_,z_}]=True;
Timing[DeleteDuplicates[data,sameQ]][[1]];
If N is a large number this takes an ungodly amount of time?
Is there a more efficient way to delete the duplicate entries of Data ?
ie.
Data = {{1.,2.},{1.,3.},{2.,3.}};
Would become:
{{1.,2.},{ 2.,3.}};
Thanks,
Clint Zeringue
- Follow-Ups:
- Re: DeleteDuplicates is too slow?
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: DeleteDuplicates is too slow?
- From: Tomas Garza <tgarza10@msn.com>
- Re: DeleteDuplicates is too slow?
- From: Leonid Shifrin <lshifr@gmail.com>
- Re: DeleteDuplicates is too slow?