networksns.centrality_measures.edge_total_communicability

networksns.centrality_measures.edge_total_communicability(G, u, v, t=1, tol=1e-07, maxit=50)

Computes the edge total communicabilities of edge \((u, v)\).

If nodes \(u\) and \(v\) are the \(i^{th}\) and \(j^{th}\) nodes of the graph, the edge total communicability of \((u, v)\) is given by the product of their node total communicability, \((\sum_{k=1}^n (e^A)_{ik})(\sum_{k=1}^n (e^A)_{jk})\), where \(A\) denotes the adjacency matrix of the graph [1].

Parameters:
  • G (Graph object) – a graph.

  • u (node_id) – node in \(G\).

  • v (node_id) – node in \(G\).

  • t (scalar, optional) – when exponentiating multiply the adjacency matrix by t, default: 1.

  • tol (float,optional) – tolerance for convergence, relative accuracy, default: 1e-7.

  • maxit (integer, optional) – maximum number of Lanczos iterations, default: 50

Returns:

tc (float) total communicability of edge \((u,v)\).

Examples

>>>  from networksns import centrality_measures as cm
>>>  import networkx as nx

Create graph \(G\)

>>>    G = nx.Graph()
>>>    G.add_edge(1, 2)
>>>    G.add_edge(2, 3)
       EdgeView([(1, 2), (2, 3)])

Compute the edge total communicability of edge \((1,2)\).

>>>    tc_12 = cm.edge_total_communicability(G, 1, 2)

References