# Does clustering_leading_eigen function convert weight to multiedges?

I use R and want to apply a clustering_leading_eigen function on an undirected weighted graph G=(V,E). The wights are nonnegative integers.
If I choose NULL for the parameter weights in function, then does that create a multigraph by adding n-1 extra edges besides for particular an edge e (I assumed that edge e has weight of n and connects vertices v,u\in V)?
Because in a paper “Analysis of weighted networks”, Newman mentioned such a way of conversion for weighted graphs.

This method is defined in terms of the graph’s adjacency matrix A.

If the graph is unweighted, then A_{ij} is the number of connections between vertices i and j (or twice that number if i=j).

If the graph is weighted, then A_{ij} the sum of the weights of edges between i and j (or twice that number if i=j).

This is consistent with the paper you cite.

Just to add what Szabolcs said: if edge e has weight n, and you do not pass in the weights explicitly, igraph will simply interpret it as a single edge. That is, it won’t generate n - 1 “additional” edges for you in some way. In short, if you have edge weights, you probably just want to pass them in.

In a paper “Finding community structure in networks using the eigenvectors of matrices”, to find a modularity, denoted as Q, the following equation was used.

Q=\frac{1}{2m}\displaystyle\sum_{i,j}^n(A_{ij}-P_{ij})\delta (c_i ,c_j)

So A_{ij} represents here a weight, nonnegative integer, for an edge \{i,j\}.

So if I pass NULL to the weights parameter, then does cluster_leading_eigenvector function treat weights in such a way for detecting a set of communities based on leading eigenvectors of a modularity matrix?

I can’t quite understand your question …

Let’s put it like this: If you pass NULL, all edges will have weight 1.

Does this help?