list equation
- To: mathgroup at smc.vnet.net
- Subject: [mg121915] list equation
- From: dimitris <dimmechan at yahoo.com>
- Date: Thu, 6 Oct 2011 04:24:55 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hello to all. Let lst = Tuples[Range[100], 2]; In the previous list appear elements such us {x,y} and {y,x}. (e.g. {3,4} and {4,3}). I want to create a new list with {y,x} dropped (that is, in the new list appears only {3,4} and not {4,3}). I use lstnew = Union[lst, SameTest -> (#1 == Reverse[#2] &)] However it is needed almost 150 sec for this procedure ($Version->5.2 for Windows) I know that my laptop is too old but I guess there is a more efficient way to create lstnew. Any ideas? Thanks a lot Dimitris
- Follow-Ups:
- Re: list equation
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: list equation
- From: Adriano Pascoletti <adriano.pascoletti@uniud.it>
- Re: list equation
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: list equation
- From: "Harvey P. Dale" <hpd1@nyu.edu>
- Re: list equation
- From: Chris Arthur <chris.arthur1@gmail.com>
- Re: list equation
- From: Richard Hofler <rhofler@bus.ucf.edu>
- Re: list equation