Learn R Programming

NetworkDistance (version 0.3.6)

nd.nfd: Network Flow Distance

Description

Network Flow Distance

Usage

nd.nfd(
  A,
  order = 0,
  out.dist = TRUE,
  vect = seq(from = 0, to = 10, length.out = 1000)
)

Value

a named list containing

D

an \((N\times N)\) matrix or dist object containing pairwise distance measures.

Arguments

A

a list of length \(N\) containing adjacency matrices.

order

the order of Laplacian; currently only 0 and 1 are supported.

out.dist

a logical; TRUE for computed distance matrix as a dist object.

vect

a vector of parameters \(t\) whose values will be used.

Examples

Run this code
if (FALSE) {
## load example data
data(graph20)

# compute two diffusion-based distances and visualize
out1 = nd.gdd(graph20, out.dist=FALSE)
out2 = nd.nfd(graph20, out.dist=FALSE)

# visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,2), pty="s")
image(out1$D[,20:1],col=gray((0:32)/32), main="nd.gdd",axes=FALSE)
image(out2$D[,20:1],col=gray((0:32)/32), main="nd.nfd",axes=FALSE)
par(opar)
}

Run the code above in your browser using DataLab