MathGroup Archive 2010

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

Search the Archive

Re: Deleting Duplicates

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110235] Re: Deleting Duplicates
  • From: Peter Pein <petsie at dordos.net>
  • Date: Thu, 10 Jun 2010 08:06:05 -0400 (EDT)
  • References: <hu4sel$1kh$1@smc.vnet.net>

Am Wed, 2 Jun 2010 06:07:17 +0000 (UTC)
schrieb Andrzej Kozlowski <akoz at mimuw.edu.pl>:

> This method seems to be fairly quick:
> 
> test[p_, a_] :==
>  Position[Complement[a, {p}], {___, Sequence @@ p, ___}, 1, 1] !== {}
> 
> DeleteCases[a, _?(test[#, a] &)]
> 
> {{x1,x2,x3,x13,x18},{x1,x2,x7,x12,x15},{x1,x4,x5,x9,x16},{x1,x2,x7,x12,x14,x18},{x1,x4,x5,x9,x11,x17},{x1,x4,x6,x8,x10,x17}}
> 
> Andrzej Kozlowski
> 
> 
really nice :-)


  • Prev by Date: Re: PDE, laplace, exact, should be simple...
  • Next by Date: Re: Push to clipboard?
  • Previous by thread: Re: Deleting Duplicates
  • Next by thread: Re: Deleting Duplicates