You can look at my implementation of the R %in% function in Stan here – Stan equivalent of R's %in% function
Look down in the comments for an even faster version from a real programmer.
This can help with accessing ragged arrays.
You can look at my implementation of the R %in% function in Stan here – Stan equivalent of R's %in% function
Look down in the comments for an even faster version from a real programmer.
This can help with accessing ragged arrays.