copy_logic: copy_logic, algo_composite$copy_logic_to,...

Description Usage Arguments Value Examples

Description

Copies the internal logic of a composite algorithm on a different composite algorithm.

Usage

1
copy_logic(source, target, ...)

Arguments

source

A composite algorithm (R6 Class algo_composite)

target

A composite algorithm (R6 Class algo_composite)

...

For future usage

Value

N/A

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# R function style:
a1 <- algo_xnor$new();
a2 <- algo_composite$new(dim_i = 2, dim_o = 1);
copy_logic(a1, a2);
a2$plot();

# R6 method style with copy from:
a3 <- algo_composite$new(dim_i = 2, dim_o = 1);
a3$copy_logic_from(a1);
a3$plot();

# R6 method style with copy to:
a4 <- algo_composite$new(dim_i = 2, dim_o = 1);
a1$copy_logic_to(a4);
a4$plot();

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