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

Description Usage Arguments Value

View source: R/tempflow-basics.R

Description

Is a function that takes a 'tempflow'-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 'tempflow'-object where the newly introduced point is embedded in between the specified predecessor and successor points.

Usage

1
2
3
4
## S3 method for class 'tempflow'
insert_point(tempFlow, newPoint, predPointList,
  sucPointList, weightList = NULL, pointAttrList = NULL,
  stepAttrList = NULL, removeEdges = TRUE, safe = TRUE)

Arguments

tempFlow

A 'tempflow'-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.

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 given 'tempflow'-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 condition are checked (e.g. duplicate names, cycles, ... ).

Value

A new 'tempflow'-object, constructed by removing the specified edges from the given 'tempflow'-object.


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