calculate.PFN {MEGENA}R Documentation

PFN calculation

Description

main function to calculate PFN a ranked list of edge pairs

Usage

calculate.PFN(edgelist,max.skipEdges = NULL,maxENum = NULL,doPar = FALSE,
num.cores = NULL,keep.track = TRUE)

Arguments

edgelist

three column edgelist: first two columns are topological edges, and the third column is the weight. Must be a data.frame object.

max.skipEdges

Maximum number of edges to be searched by planarity test without any inclusion to PFN. If set NULL, it will be automatically set to number of cores x 1000. It acts as a threhold to quicken PFN construction termination during PCP.

maxENum

maximum number of edges to include in final PFN. Default value is NULL, which invokes maximal number of edges allowed in planar network.

doPar

TRUE/FALSE logical variable to choose parallelization.

num.cores

number of cores to use in parallelization.

keep.track

If TRUE, pfg_el.RData will be created in working folder. This file can be used later for restart in case PFN construction did not finish successfully. Default is TRUE.

Details

If doPar = TRUE, then num.cores are registered for PCP.

Value

output is three column edgelist data.frame, third column being the weight.

Author(s)

Won-Min Song

Examples

# test simplest case of planar network (a 3-clique).
a <- c(1,1,2);b <- c(2,3,3);w <- runif(3,0,1);
el <- cbind(a,b,w);el <- as.data.frame(el[order(el[,3],decreasing = TRUE),])
calculate.PFN(edgelist = el,max.skipEdges = Inf,doPar = FALSE,num.cores = NULL)

[Package MEGENA version 1.3.7 Index]