ME.simplification: Simplify multiple edges in a network

Description Usage Arguments Value Note Author(s) See Also

View source: R/optimization.r

Description

A function to simplfy multiple-edge into one representative edge, where a multiple-edge structure refers to a set of edges sharing with the same pair of nodes.

Usage

1
2
3
ME.simplification(nodelist, edgelist, eadf=NULL, ea.prop=NULL, Directed=F, 
                  DegreeL=NULL, InDegreeL=NULL, OutDegreeL=NULL,Nexception=NULL,
                  Eexception=NULL)

Arguments

nodelist

A “nodelist” object;

edgelist

An “edgelist” object

eadf

A data frame of attributes corresponding to all the edges;

ea.prop

A vector (of the length equalling to the number of edge attributes in “eadf”) with values of 1, 2, 3 or 4, and each specific value represent a function to assign the attributes of the edited edges, see also Redef.functions:

1->sum(v)

2->min(v)

3->max(v)

4->mean(v)

Directed

TRUE if edges are directed, FALSE otherwise;

DegreeL

DegreeL

An integer vector of degrees for each node in the given “nodelist”, and it could be ignored if edges are directed

InDegreeL

An integer vector of In-degrees for each node in the given “nodelist”, and it could be ignored if edges are undirected

OutDegreeL

An integer vector of Out-degrees for each node in the given “nodelist”, and it could be ignored if edges are undirected

Nexception

A vector of node IDs concerned as exceptions, and all the edges with these nodes included won't be processed;

Eexception

A vector of edge IDs concerned as exceptions, and all these edges won't be processed;

Value

Two types of list returned for undirected and directed edges, respectively:

For “undirected” edges:

newNodelist

New node list with multiple-edges simplified;

newEdgelist

New edge list with multiple-edges simplified;

newEadf

New attribute data frame for the returned edgelist;

DegreeL

New degree vector cooresponding to the newly returned node list;

For “directed” network:

newNodelist

New node list with multiple-edges simplified;

newEdgelist

New edgelist with multiple-edges simplified;

newEadf

Data frame of attributes for the newly returned edge list;

InDegreeL

New In-degree vector cooresponding to the newly returned node list;

OutDegreeL

New Out-degree vector cooresponding to the newly returned node list;

Note

Edges are recognised as a structure of multiple-edge when they share the same pair of nodes. Note that the order of the nodes should be also the same when edges are directed.

Author(s)

Binbin Lu lubinbin220@gmail.com

See Also

SL.extraction, PN.amalgamation


shp2graph documentation built on May 1, 2019, 9:45 p.m.