graphUpdateOne {regrap}R Documentation

Single Step Graph Update

Description

Update the graph by removing one vertex

Usage

graphUpdateOne(w, G, vec01)

Arguments

w

a numeric vector of vertex weights

G

a matrix of transition weights

vec01

a binary vector indicating the set of vertices planned to be removed: the vertex corresponding to the first zero in this vector will be removed

Value

a list of one updated vertex weight vector, one updated transition weight matrix, one updated indicator vector, and a binory TRUE/FALSE indicater to show whether a node has been removed

Author(s)

Jiangtao Gou

Examples

w <- c(0.1,0.2,0.3,0.4)
G <- matrix(c(0,0.3,0.3,0.4, 0.6,0,0.2,0.2, 0.5,0.2,0,0.3, 0.3,0.4,0.3,0),nrow=4,byrow=TRUE)
vec01 <- c(1,0,0,1)
graphUpdateOne(w=w,G=G,vec01=vec01)


[Package regrap version 1.0.1 Index]