# graph.strength

From igraph v0.5.2-2
by Gabor Csardi

##### Strength or weighted vertex degree

Summing up the edge weights of the adjacent edges for each vertex.

- Keywords
- graphs

##### Usage

```
graph.strength (graph, vids = V(graph), mode = c("all", "out", "in", "total"),
loops = TRUE, weights = NULL)
```

##### Arguments

- graph
- The input graph.
- vids
- The vertices for which the strength will be calculated.
- mode
- Character string,
out for out-degree,in for in-degree orall for the sum of the two. For undirected graphs this argument is ignored. - loops
- Logical; whether the loop edges are also counted.
- weights
- Weight vector. If the graph has a
`weight`

edge attribute, then this is used by default. If the graph does not have a`weight`

edge attribute and this argument is`NULL`

, then a warning is given and

##### Value

- A numeric vector giving the strength of the vertices.

##### References

Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: The architecture of complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)

##### See Also

`degree`

for the unweighted version.

##### Examples

```
g <- graph.star(10)
E(g)$weight <- seq(ecount(g))
graph.strength(g)
graph.strength(g, mode="out")
graph.strength(g, mode="in")
# No weights, a warning is given
g <- graph.ring(10)
graph.strength(g)
```

*Documentation reproduced from package igraph, version 0.5.2-2, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.