This question may be a smidgen out of place, but as I am working in perl, I thought this a good place to go for the answer. By way of introduction, I'm working on a computer similation in perl of overgrowth in
on subtidal rock walls. I'm using an object oriented approach, so, Colony is one of my objects. Each colony has a list of cells it currently occupies. Currently its just an array of paired values. So here's the question:
As any individual cell the colony occupies may be overgrown, what is an efficient way to tell whether or not a particular instance of overgrowth has severd the formerly single colony into two new colonies? I feel like there must be an algorithm for this, or perhaps a more efficient data structure for the stroage of occupied cells than an array of paired values. Any suggestions/code snippets/etc?