Skip to contents

Works for the all instances of the object-class, except for the segment-class.

Usage

forbidden(object)

forbidden(object) <- value

# S4 method for class 'polygon'
forbidden(object)

# S4 method for class 'polygon'
forbidden(object) <- value

# S4 method for class 'rectangle'
forbidden(object)

# S4 method for class 'rectangle'
forbidden(object) <- value

# S4 method for class 'circle'
forbidden(object)

# S4 method for class 'circle'
forbidden(object) <- value

Arguments

object

An instance of the object-class.

value

Value with which to replace the original value of the forbidden slot.

See also

Examples

# Initialize an object
my_rectangle <- rectangle(center = c(0, 0), 
                          size = c(1, 1), 
                          forbidden = 1)

# Access iteration slot
forbidden(my_rectangle)
#> [1] 1

# Change the iteration slot
forbidden(my_rectangle) <- 2:3
forbidden(my_rectangle)
#> [1] 2 3