| 10841 | } |
| 10842 | |
| 10843 | bool cHardwareCPU::Inst_ApplyPointMutationsGroupGS(cAvidaContext& ctx) |
| 10844 | { |
| 10845 | double point_mut_prob = m_world->GetConfig().INST_POINT_MUT_PROB.Get(); |
| 10846 | |
| 10847 | // Check for test CPU |
| 10848 | if (m_organism->GetOrgInterface().GetDeme() == NULL) return false; |
| 10849 | |
| 10850 | // Grab a random member of the deme. |
| 10851 | // Pick a random starting location... |
| 10852 | int deme_size = m_organism->GetDeme()->GetSize(); |
| 10853 | int start_pos = ctx.GetRandom().GetInt(0,deme_size); |
| 10854 | bool gs = m_organism->IsGermline(); |
| 10855 | |
| 10856 | for (int i=0; i<deme_size; ++i) { |
| 10857 | int pos = (i + start_pos) % deme_size; |
| 10858 | cPopulationCell& cell = m_organism->GetDeme()->GetCell(pos); |
| 10859 | if (cell.IsOccupied()) { |
| 10860 | cOrganism* sl = cell.GetOrganism(); |
| 10861 | if (gs == sl->IsGermline()) { |
| 10862 | int num_mut = sl->GetHardware().PointMutate(ctx, point_mut_prob); |
| 10863 | sl->IncPointMutations(num_mut); |
| 10864 | return true; |
| 10865 | } |
| 10866 | } |
| 10867 | } |
| 10868 | return true; |
| 10869 | } |
| 10870 | |
| 10871 | |
| 10872 | bool cHardwareCPU::Inst_JoinGermline(cAvidaContext& ctx) { |
nothing calls this directly
no test coverage detected