Skip to contents

Weighted Graph Distance Between Graphs with Identical Vertex Sets

Usage

identical.vertex.set.weighted.graph.similarity(
  adj.list1,
  length.list1,
  adj.list2,
  length.list2,
  calculate.normalized.deviation = FALSE
)

Arguments

adj.list1

First graph adjacency list.

length.list1

First graph edge weights.

adj.list2

Second graph adjacency list.

length.list2

Second graph edge weights.

calculate.normalized.deviation

Logical; if TRUE, normalize the L1 distance-matrix deviation.

Value

Numeric distance-matrix deviation.

Examples

graph <- list(2L, c(1L, 3L), 2L)
weights1 <- list(1, c(1, 1), 1)
weights2 <- list(1, c(1, 2), 2)
identical.vertex.set.weighted.graph.similarity(
  graph, weights1, graph, weights2
)
#> [1] 4