layerMatrix: Layer (sphere) matrix

Description Usage Arguments Value Author(s) References Examples

View source: R/layerMatrix.R

Description

This method calculates the layer matrix, also known as sphere matrix, of a graph.

Usage

1

Arguments

g

a graph as a graphNEL object.

dist

the pre-computed distance matrix of the graph. Will be calculated automatically if NULL.

Value

This method returns the layer (sphere) matrix of a graph. Each row of this matrix represents a vertex in the graph. The j-th column specifies the number of vertices in the j-sphere of this vertex.

Author(s)

Michael Schutte

References

E. V. Konstantinova, On some applications of information indices in chemical graph theory, in R. Ahlswede et al. (eds.), General Theory of Information Transfer and Combinatorics, LNCS, pp. 831-852, Springer, 2006

Examples

1
2
3
4
set.seed(123)
g <- randomGraph(1:8, 1:5, 0.36, weights=FALSE)

layerMatrix(g)

Example output

Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: RBGL
Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn


Attaching package: 'QuACN'

The following object is masked from 'package:graph':

    adjacencyMatrix

  [,1] [,2]
1    4    3
2    3    4
3    5    2
4    5    2
5    7    0
6    4    3
7    7    0
8    3    4

QuACN documentation built on May 2, 2019, 5:46 p.m.