is.weighted

0th

Percentile

Weighted graphs

In weighted graphs, a real number is assigned to each (directed or undirected) edge.

Keywords
graphs
Usage
is.weighted(graph)
Arguments
graph
The input graph.
Details

In igraph edge weights are represented via an edge attribute, called weight. The is.weighted function only checks that such an attribute exists. (It does not even checks that it is a numeric edge attribute.)

Edge weights are used for different purposes by the different functions. E.g. shortest path functions use it as the cost of the path; community finding methods use it as the strength of the relationship between two vertices, etc. Check the manual pages of the functions working with weighted graphs for details.

Value

  • A logical scalar.

concept

Weighted graphs

Aliases
  • is.weighted
Examples
g <- graph.ring(10)
get.shortest.paths(g, 8, 2)
E(g)$weight <- seq_len(ecount(g))
get.shortest.paths(g, 8, 2)
Documentation reproduced from package igraph, version 0.6.5-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.