Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Block of a kernel generator expression.
This version uses zero-based indices in contrast to the 1-based block(), which is exposed to the Stan language.
Block operation modifies how its argument is indexed. If a matrix is both an argument and result of such an operation (such as in block_zero_based(a, row1, col1, rows, cols) = block_zero_based(a, row2, col2,
rows, cols);
), the result can be wrong due to aliasing. In such case the expression should be evaluating in a temporary by doing block_zero_based(a, row1, col1, rows, cols) = block_zero_based(a, row2, col2,
rows, cols).eval();
. This is not necessary if the blocks do not overlap or if they are the same block.
T | type of argument |
a | input argument |
start_row | first row of block |
start_col | first column of a block |
rows | number of rows in block |
cols | number of columns in block |
Definition at line 340 of file block_zero_based.hpp.