| 1579 | } |
| 1580 | |
| 1581 | void cStats::PrintResourceLocData(const cString& filename, cAvidaContext& ctx) |
| 1582 | { |
| 1583 | Avida::Output::FilePtr df = Avida::Output::File::StaticWithPath(m_world->GetNewWorld(), (const char*)filename); |
| 1584 | |
| 1585 | df->WriteComment("Avida resource location data"); |
| 1586 | df->WriteTimeStamp(); |
| 1587 | df->WriteComment("First column gives the current update, all further columns give the cell id"); |
| 1588 | df->WriteComment("for center of gradient resources at that update."); |
| 1589 | |
| 1590 | df->Write(m_update, "Update"); |
| 1591 | |
| 1592 | const cResourceLib& resLib = m_world->GetEnvironment().GetResourceLib(); |
| 1593 | for (int i = 0; i < resLib.GetSize(); i++) { |
| 1594 | if (resLib.GetResource(i)->GetGradient()) { |
| 1595 | df->Write(m_world->GetPopulation().GetCurrPeakX(ctx, i) + (m_world->GetPopulation().GetCurrPeakY(ctx, i) * m_world->GetConfig().WORLD_X.Get()), "CellID"); |
| 1596 | } |
| 1597 | } |
| 1598 | df->Endl(); |
| 1599 | } |
| 1600 | |
| 1601 | void cStats::PrintResWallLocData(const cString& filename, cAvidaContext& ctx) |
| 1602 | { |
no test coverage detected