igraph-help
[Top][All Lists]

## Re: [igraph] Euclidean distance between two adj matrices

 From: anupam sinha Subject: Re: [igraph] Euclidean distance between two adj matrices Date: Fri, 8 Jan 2010 11:36:17 +0530

Thanks a lot for your response Gabor. Euclidean distance between two matrices is what I am looking for.

Thanks and Regards,

Anupam

On Thu, Jan 7, 2010 at 11:55 PM, Gábor Csárdi wrote:
Hi Anupam,

you mean with 'igraph' objects? I don't know of such a function. Maybe
you could play with the operators, create the union of the graphs to
get all edges, the intersection to get the common ones. This should be
enough to calculate the Euclidean distance. (Btw. what do you exactly
mean by 'Euclidean distance'?)

If you have matrices, then it is easy of course:
sqrt(sum((M1 - M2) ^ 2 ))

But this is slow if you have large, sparse matrices.

Best,
Gabor

On Wed, Dec 30, 2009 at 7:04 AM, anupam sinha <address@hidden> wrote:
> Dear all,
>
>                Is there any igraph function in R to measure the euclidean
> distance between two adjacency matrices ? Thanks in advance for any
> suggestions.
>
>
> Regards,
>
> Anupam
>
>
>
> _______________________________________________
> igraph-help mailing list
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>

--
Gabor Csardi <address@hidden>     UNIL DGM

_______________________________________________
igraph-help mailing list
http://lists.nongnu.org/mailman/listinfo/igraph-help

--