[R] floodfill with matrix data

Thomas Petzoldt thpe at hhbio.wasser.tu-dresden.de
Mon Aug 25 17:42:24 CEST 2003

Barry Rowlingson wrote:

> Howabout this i just bashed up from a quick search:
>  boundaryFill <- function(mat, x,y,fill,boundary)


>  note it fills 4-connected regions. I wouldnt like to do it on anything 
> complex since it'll be awful slow....

Yes, this is in principle the same solution I use during aan external C 
function. However, the problem is not only speed, but the large amount 
of stack memory with larger matrices (say 100 x 100) due to recursion, 
no matter if I use options(expression = large_value) or not.

Thank you


More information about the R-help mailing list