connectedSubGraph: Deriving connected subgraph

View source: R/graphhelpfns.R

connectedSubGraphR Documentation

Deriving connected subgraph

Description

This function derives an adjacency matrix of a subgraph whose nodes are connected to at least one other node in a graph

Usage

connectedSubGraph(adj)

Arguments

adj

square adjacency matrix with elements in {0,1}, representing a graph

Value

adjacency matrix of a subgraph of graph represented by 'adj' whose nodes have at least one connection

Examples

dim(gsimmat) #full graph contains 100 nodes
gconn<-connectedSubGraph(gsimmat) #removing disconnected nodes
dim(gconn) #connected subgraph contains 93 nodes

BiDAG documentation built on May 31, 2023, 6:46 p.m.