Last chance! 50% off unlimited learning
Sale ends in
A function to amalgamate edges connected by a pseudo-node.
PN.amalgamation(nodelist, edgelist, eadf=NULL, ea.prop=NULL, Directed=F,
DegreeL=NULL, InDegreeL=NULL, OutDegreeL=NULL,Nexception=NULL,
Eexception=NULL)
A “nodelist” object;
An “edgelist” object
A data frame of attributes corresponding to all the edges;
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)
TRUE if edges are directed, FALSE otherwise;
An integer vector of degrees for each node in the given “nodelist”, and it could be ignored if edges are directed
An integer vector of In-degrees for each node in the given “nodelist”, and it could be ignored if edges are undirected
An integer vector of Out-degrees for each node in the given “nodelist”, and it could be ignored if edges are undirected
A vector of node IDs concerned as exceptions, and all the edges with these nodes included won't be processed;
A vector of edge IDs concerned as exceptions, and all these edges won't be processed;
Two types of list returned for undirected and directed edges, respectively:
For “undirected” edges:
New node list with pseudo-nodes removed;
New edge list with pseudo-nodes removed;
New attribute data frame for the returned edgelist;
New degree vector cooresponding to the newly returned node list;
New node list with pseudo-nodes removed;
New edgelist with pseudo-nodes removed;
Data frame of attributes for the newly returned edge list;
New In-degree vector cooresponding to the newly returned node list;
New Out-degree vector cooresponding to the newly returned node list;
# NOT RUN {
data(ORN)
rtNEL<-readshpnw(ORN.nt, ELComputed=TRUE)
res.sl<-SL.extraction(rtNEL[[2]],rtNEL[[3]])
res.me<-ME.simplification(res.sl[[1]],res.sl[[2]],DegreeL=res.sl[[4]])
res.pn<-PN.amalgamation(res.me[[1]],res.me[[2]],DegreeL=res.me[[4]])
ptcoords<-Nodes.coordinates(res.pn[[1]])
#plot(ORN.nt)
#points(ptcoords, col="green")
#plot(ORN.nt)
#points(Nodes.coordinates(rtNEL[[2]]), col="red")
# }
Run the code above in your browser using DataLab