insert_point.tempnetwork: Is a function that takes a 'tempnetwork'-object; a string...

Description Usage Arguments Value

View source: R/tempnetwork-tempflow-basics.R

Description

Is a function that takes a 'tempnetwork'-object; a string representing the name of the point to be added; a two vectors containing the point-names (or point-ids) of the points which ought to be predecessors and successors of the newly added point. Given this input the function, returns a new 'tempnetwork'-object containing a new 'tempflow'-object, where the newly introduced point is embedded in between the specified predecessor and successor points.

Usage

1
2
3
4
5
## S3 method for class 'tempnetwork'
insert_point(tempNetwork, newPoint, predPointList,
  sucPointList, graphList, equivRel = NULL, weightList = NULL,
  pointAttrList = NULL, stepAttrList = NULL, removeEdges = TRUE,
  safe = TRUE)

Arguments

tempNetwork

A 'tempnetwork'-object.

newPoint

A point-name (or point-id) of the point to be inserted.

predPointList

A vector containing the point-names (or point-ids) of the points serving as predecessors of the new point.

sucPointList

A vector containing the point-names (or point-ids) of the points serving as successors of the new point.

graphList

A named list containing 'igraph'-objects. The names of this list must correspond with the names of the newly added points. Moreover, all graphs must have the same number of vertices.

equivRel

A named list of named lists, where the outer-level names must be identical to the outer-level names of the already existing equivalence Releation; where the inner-level names must be identical with the names of the newly added points; where the values must be identical to the vertex-names of the corresponding newly added graph. Moreover, if the existing equivalence class is NULL and the parameter "equivRel" is NULL, then it must be the case that the names of the vertices must be identical in each graph (including the already existing graphs). Otherwise, the given equivalence relation will be merged with the already existing one.

weightList

A vector specifying the step-weights of newly introduced edges. If left NULL, every newly introduced loop will be assigned the value 0, and every other new edge will be assigned the value 1. Otherwise, it must be either a scalar (i.e. length 1) or a vector with the same length as the sum of the length of the "predPointList" and the "sucPointList".

pointAttrList

Is a vector to specify other point attributes. If left NULL, no attributes (other than name) will be assigned to the newly introduced point in time. Otherwise, this list has to be structured as required by the function igraph::add.vertices().

stepAttrList

Is a vector to specify other step attributes. If left NULL, no attributes (other than weight) will be assigned to the newly introduced steps in time. Otherwise, this list has to be structured as required by the function igraph::add.edges().

safe

If TRUE, it will be ensured that the specified point-names (or point-ids) are present in the 'tempflow'-object of the given 'tempnetwork'-object; that point names remain unique; that point-names remain strings. that the 'weightList'-vector is either of length 1 or has the same length as the sum of the length of the "predPointList"-vector and the "sucPointList"-vector. that the weights of the resulting 'tempflow'-object are non-negative, numerical values; Additionally, the usual tempflow and tempnetwork condition are checked.

Value

A new 'tempnetwork'-object, containing a new 'tempflow'-object constructed by removing the specified edges from the 'tempflow'-object of the given 'tempnetwork'-object; containing a new "graphList" constructed by extending the existing "graphList" by the provided list of graphs; containing a new "equivRel" constructed by extending the existing "equivRel" by the provided equivalence relation fragment.


KonstantinRK/tempnetwork documentation built on Dec. 23, 2019, 6:40 p.m.