# Graph Centrality

`EvolvingGraphs.Centrality.katz`

— Function.`katz(g, alpha = 0.1)`

Compute the Katz centrality for a static graph `g`

.

**References:**

L. Katz A new index derived from sociometric data analysis. Psychometrika, 18:39-43, 1953.

```
katz(g, alpha = 0.3)
katz(g, alpha, beta; mode = :broadcast)
```

Computes the katz centrality for an evolving graph `g`

, where `alpha`

and `beta`

are scalars. `alpha`

controls the influence of long walks and `beta`

controls the influence of walks happened long time ago. By default, `mode = :broadcast`

computes the broadcast centrality. Otherwise if `mode = :receive`

, we compute the receiving centrality.

**Example**

```
julia> using EvolvingGraphs
julia> using EvolvingGraphs.Centrality
julia> g = evolving_graph_from_arrays(["A", "B", "B", "C", "E", "A", "B", "D"], ["B", "F", "G", "E", "G", "B", "F", "F"], [1,1,1,2,2,2,2,2])
Directed EvolvingGraph 7 nodes, 8 static edges, 2 timestamps
julia> katz(g)
7-element Array{Tuple{EvolvingGraphs.Node{String},Float64},1}:
(Node(A), 0.510104)
(Node(B), 0.494488)
(Node(F), 0.260257)
(Node(G), 0.260257)
(Node(C), 0.361757)
(Node(E), 0.338334)
(Node(D), 0.338334)
julia> katz(g, 0.3, 0.4, mode = :receive)
7-element Array{Tuple{EvolvingGraphs.Node{String},Float64},1}:
(Node(A), 0.0)
(Node(B), 0.658926)
(Node(F), 1.0)
(Node(G), 0.658926)
(Node(C), 0.0)
(Node(E), 0.204852)
(Node(D), 0.0)
```

**References:**

P. Grindrod, D. J. Higham, M. C. Parsons and E. Estrada Communicability across evolving networks. Physical Review E, 83 2011.

P. Grindrod and D. J. Higham, A matrix iteration for dynamic network summaries. SIAM Review, 55 2013.