Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5484 > unrolled thread
| Started by | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| First post | 2011-10-07 08:57 +0000 |
| Last post | 2011-10-07 08:57 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: list equation DrMajorBob <btreat1@austin.rr.com> - 2011-10-07 08:57 +0000
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Date | 2011-10-07 08:57 +0000 |
| Subject | Re: list equation |
| Message-ID | <j6meta$7fm$1@smc.vnet.net> |
lst = Subsets[Range[100], {2}];
Length@lst
4950
Bobby
On Thu, 06 Oct 2011 03:24:55 -0500, dimitris <dimmechan@yahoo.com> wrote:
> 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
>
--
DrMajorBob@yahoo.com
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web