MCPcopy Create free account
hub / github.com/devosoft/avida / GetNeighborhoodCellIDs

Method GetNeighborhoodCellIDs

avida-core/source/main/cPopulationInterface.cc:267–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void cPopulationInterface::GetNeighborhoodCellIDs(Apto::Array<int>& list)
268{
269 cPopulationCell& cell = m_world->GetPopulation().GetCell(m_cell_id);
270 assert(cell.IsOccupied());
271
272 list.Resize(cell.ConnectionList().GetSize());
273 tConstListIterator<cPopulationCell> it(cell.ConnectionList());
274 int i = 0;
275 while (it.Next() != NULL) list[i++] = it.Get()->GetID();
276}
277
278void cPopulationInterface::GetAVNeighborhoodCellIDs(Apto::Array<int>& list, int av_num)
279{

Callers 5

ProcessMethod · 0.45
SelectOffspringMethod · 0.45

Calls 7

IsOccupiedMethod · 0.80
GetCellMethod · 0.45
ResizeMethod · 0.45
GetSizeMethod · 0.45
NextMethod · 0.45
GetIDMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected