adjMat: Adjacency matrix

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.r

Description

Returns the adjacency matrix based on a list of edges, supplied in a gRapHD object or as a matrix.

Usage

1
adjMat(model=NULL,edges=NULL,p=NULL)

Arguments

model

gRapHD object.

edges

matrix with 2 columns, each row representing one edge, and each column one of the vertices in the edge. Column 1 contains the vertex with lower index.

p

number of vertices.

Details

The dimension of the matrix is given by model$p or by the maximum value between max(edges) and p.

Value

matrix

p by p.

Author(s)

Gabriel Coelho Goncalves de Abreu (abreu_ga@yahoo.com.br)

Examples

1
2
3
4
data(dsCont)
m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="LR")
edges <- SubGraph(edges=m1@edges,v=1:10)@edges
adjMat(edges=edges,p=10)

gRapHD documentation built on Feb. 9, 2018, 6:05 a.m.

Related to adjMat in gRapHD...