Degree {gRapHD}R Documentation

Degree.

Description

Returns the degree of a set of vertices.

Usage

  Degree(model=NULL,edges=NULL,v=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.
v set of vertices.

Details

Calculates the degree of each vertex in v. If v=NULL, it returns the degree of all vertices in edges. If v contains a vertex not in edges, the corresponding value is NA.

Value

vector length(v).

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")
  Degree(model=m1)

[Package gRapHD version 0.1.0 Index]