Matrix x should be a process matrix with identical number of rows and columns. Matrix y should have one column, with each row indicating abundance at a given stage. The number of rows must be identical to the number of columns in x. A binomial distribution is used, where size is drawn from the y matrix and prob is drawn from the x matrix.

x %*b% y

Arguments

x

A matrix with identical number of rows and columns.

y

A vector or matrix with one column.

Value

A vector of the projected abundance for each stage.

Examples

population0 <- c(148, 82, 111, 99)
survival_mat <- bbs_matrix_survival(c(0.845, 0.872, 0.859, 0.861))
survival_mat %*b% population0
#>      [,1]
#> [1,]  125
#> [2,]   73
#> [3,]   94
#> [4,]   83