DirectedEdge: R6 class representing the directed edge between two nodes

Description Details Methods

Description

R6 class representing the directed edge between two nodes

R6 class representing the directed edge between two nodes

Details

Edges in graph building are implicit (stored as child nodes for each node) so these edges are used primarily for implementing simulation. They store references to the parent nodes and they can modfiy both nodes.

Methods

Public methods


Method new()

Used as DirectedEdge$new(...) create a new edge between two nodes.

Usage
DirectedEdge$new(from, tail, to, head)
Arguments
from

(directed) edge originates at this node

tail

effect of edge on the ('from') node it originates from as a list of 'dplyr::mutate'-style expressions. The expressions can access the special objects '.from' and '.to' which are used to access the nodes at the head or tail of the edge. They are used as '.from$foo' to access attribute or or data 'foo' in the tail node.

to

(directed) edge goes to this node

head

parallel to 'tail', but for the 'to' node.

Returns

a 'DirectedEdge' object


Method transfer()

Usage
DirectedEdge$transfer()

Method clone()

The objects of this class are cloneable with this method.

Usage
DirectedEdge$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


sakrejda/smgr documentation built on Sept. 1, 2020, 10:03 a.m.