Re: Euclidean distance of all pairwise combinations (redundants)
- To: mathgroup at smc.vnet.net
- Subject: [mg128661] Re: Euclidean distance of all pairwise combinations (redundants)
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Thu, 15 Nov 2012 03:56:14 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <k7ve05$s08$1@smc.vnet.net>
- Reply-to: nma at 12000.org
On 11/14/2012 12:33 AM, Jesse Pisel wrote:
>
> list = {{1, 1}, {2, 2}, {3, 3}}
> EuclideanDistance @@@ Subsets[list, {2}]
>
> Any ideas on how to get the euclidean distance between all the points
>including redundants and self references?
>
>
may be
------------------
list = {{1, 1}, {2, 2}, {3, 3}}
EuclideanDistance @@@ Tuples[list, 2]
-----------------
{0,Sqrt[2],2 Sqrt[2],Sqrt[2],0,Sqrt[2],2 Sqrt[2],Sqrt[2],0}
--Nasser