kaskr/RTMB

Problematic method dispatch

kaskr opened this issue · 1 comments

kaskr commented

For current master branch (a103d08) the following examples all fail:

## Mixed combine when first argument is numeric
MakeTape(function(x) c(1,x), 1:3)
## Sub-assignment to numeric vector from AD
MakeTape(function(x) {y <- 1:3; y[2] <- x; y}, 1)
## Diagonal-assignment to numeric matrix from AD
y <- matrix(0,3,3)
MakeTape(function(x) {diag(y) <- x; y}, 1:3)

Unfortunately none of these can be handled within R's existing method dispatch system.

kaskr commented

Fixed