dg.Block-class: Class dg.Block

Description Slots Extends Methods Note Author(s) See Also Examples

Description

The class for the blocks.

Slots

stratum:

Object of class "numeric", the stratum of the block.

index:

Object of class "numeric" with (minus) the index of the block, the position of the block in a block list.

parent:

Object of class "numeric" with the single parent of the block. The slots children, ancestors, and descendants are computed from parent. When conflicts between these four slots in dynamicGraphMain the tree other slots are computed from parent.

children:

Object of class "numeric" Integer vector for the children blocks of the block.

ancestors:

Object of class "numeric". Integer vector for the ancestor blocks of the block. The slots with the children and descendant blocks is set after the creation of the block (in setTreeBlocks).

descendants:

Object of class "numeric". Integer vector for the descendants blocks of the block. The slot with the descendant blocks is set after the creation of the block.

position:

Object of class "matrix", the position of the block, the two diagonal opposite corners.

closed:

Object of class "logical", if TRUE then the block is closed, e.i. drawn as a "vertex".

visible:

Object of class "logical", if TRUE then the block is drawn, else it is hidden in a closed block.

color:

Object of class "character", see "dg.Node".

label:

Object of class "character", see "dg.Node".

label.position:

Object of class "numeric", see "dg.Node".

Extends

Class "dg.Node", directly.

Methods

ancestors<-

signature(x = "dg.Block"): ...

ancestors

signature(object = "dg.Block"): ...

closed<-

signature(x = "dg.Block"): ...

closed

signature(object = "dg.Block"): ...

children<-

signature(x = "dg.Block"): ...

children

signature(object = "dg.Block"): ...

descendants<-

signature(x = "dg.Block"): ...

descendants

signature(object = "dg.Block"): ...

draw

signature(object = "dg.Block"): Method for drawing the closed block.

index<-

signature(x = "dg.Block"): ...

index

signature(object = "dg.Block"): ...

initialize

signature(.Object = "dg.Block"): ...

name

signature(object = "dg.Block"): Extract the label of the block.

parent<-

signature(x = "dg.Block"): ...

parent

signature(object = "dg.Block"): ...

position<-

signature(x = "dg.Block"): ...

position

signature(object = "dg.Block"): ...

stratum<-

signature(x = "dg.Block"): ...

stratum

signature(object = "dg.Block"): ...

visible<-

signature(x = "dg.Block"): ...

visible

signature(object = "dg.Block"): ...

Note

The dg.Block class has the methods name, label, labelPosition, position, color, stratum, index, visible, closed, parent, children, ancestors, and descendants, for extracting values and the replacement methods label<-, labelPosition<-, position<-, color<-, stratum<-, index<-, visible<-, closed<-, parent<-, children<-, ancestors<-, and descendants<-. Items are added to the pop up menu of a block by the method addToPopups.

The methods draw, and propertyDialog is also avaliable.

Author(s)

Jens Henrik Badsberg

See Also

setBlocks, setTreeBlocks, dg.Node-class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
b <- new("dg.Block")

str(b)

color(b)
label(b)
labelPosition(b)
name(b)
index(b)
position(b)
stratum(b)
ancestors(b)
descendants(b)
visible(b)

color(b) <- "grey"
label(b) <- "NameAndLabel"
labelPosition(b) <- c(1, 2, 3)
# name(b) <- "NameAndLabel" # Not possible!!!
index(b) <- 3
position(b) <- matrix(c( 10,  20,  30,  40, 
                        110, 120, 130, 140), byrow = TRUE, ncol = 4)
stratum(b) <- 1
ancestors(b) <- c(1, 2)
descendants(b) <- c(4, 5)
visible(b) <- FALSE

str(b)

dynamicGraph documentation built on May 2, 2019, 6:38 a.m.