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

Method Inst_ApplyPointMutations

avida-core/source/cpu/cHardwareCPU.cc:10789–10802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10787
10788
10789bool cHardwareCPU::Inst_ApplyPointMutations(cAvidaContext& ctx)
10790{
10791 // If repairs are off...
10792 if(m_world->GetConfig().POINT_MUT_REPAIR_START.Get() == 0) {
10793 double point_mut_prob = m_world->GetConfig().INST_POINT_MUT_PROB.Get();
10794 int num_mut = m_organism->GetHardware().PointMutate(ctx, point_mut_prob);
10795 m_organism->IncPointMutations(num_mut);
10796 } else {
10797 // incur cost of repairs.
10798 int cost = m_world->GetConfig().INST_POINT_REPAIR_COST.Get();
10799 m_task_switching_cost += cost;
10800 }
10801 return true;
10802}
10803
10804bool cHardwareCPU::Inst_ApplyVaryingPointMutations(cAvidaContext& ctx)
10805{

Callers

nothing calls this directly

Calls 5

GetConfigMethod · 0.80
PointMutateMethod · 0.80
GetHardwareMethod · 0.80
IncPointMutationsMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected