adjMat {gRapHD}R Documentation

Adjacency matrix.

Description

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

Usage

  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 of the number of vertices in edges and p.

Value

matrix p by p.

Author(s)

Gabriel Coelho Goncalves de Abreu (Gabriel.Abreu@agrsci.dk)
Rodrigo Labouriau (Rodrigo.Labouriau@agrsci.dk)
David Edwards (David.Edwards@agrsci.dk)

Examples

  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)

[Package gRapHD version 0.1.0 Index]