MathGroup Archive 2005

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

Search the Archive

Re: removing sublist . Again and Different

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56326] Re: removing sublist . Again and Different
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 22 Apr 2005 06:22:53 -0400 (EDT)
  • References: <d47tgv$575$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
  A function that removes any sublist that contains (as a true sub set)
any other sublist is:

f[t_] := Select[t,
              Function[x,
                 Nor @@ (x =E2=89=A0 # && Union[#, x] == x & /@ t)
              ]
          ]

Sincerely, Daniel

giampi1960 wrote:
> hello i read borges2003xx at yahoo.it meassage :
>
>
>
>>i'm a newbie. How implement the _faster functon_ which removes in a
>>list every element that are a subelement.
>>which means
>>f[x]:=  {..,{1,2,3,4},..,{2,3},..} removes {2,3}.
>>thanx a lot.
>>giorgio borghi
>
>
>
> i ask your help for faster way to do the opposite
> f[x]:=  {..,{1,2,3,4},..,{2,3},..} removes {1,2,3,4}.
>
> best regards
>
> giampiero
>


  • Prev by Date: Re: Sort problem
  • Next by Date: Re: Sort problem
  • Previous by thread: Re: removing sublist . Again and Different
  • Next by thread: Re: removing sublist . Again and Different