bnum: bnum (R6 class)

Description Usage Arguments Format Value Examples

Description

The R6 class implementation of the modular binary number concept.

Usage

1

Arguments

input

(conditional) An initialization value (character | logical vector)

dim

(conditional) The desired dimension of the binary number (integer)

...

For future usage.

Format

An object of class R6ClassGenerator of length 24.

Value

An object instance of class bnum.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Construction from character string
n1 <- bnum$new("0101111000");
n1$plot();

# Construction from logical vector
n2 <- bnum$new(c(TRUE,FALSE,FALSE,TRUE));
n2$plot();

# Construction with dimension, defaulting to 0
n3 <- bnum$new(dim = 5);
n3$plot();

daviddoret/haricot documentation built on May 21, 2019, 1:42 a.m.