| 81 | |
| 82 | |
| 83 | Instruction cInstSet::GetRandomInst(cAvidaContext& ctx) const |
| 84 | { |
| 85 | double weight = ctx.GetRandom().GetDouble(m_mutation_index->GetTotalWeight()); |
| 86 | unsigned inst_ndx = m_mutation_index->FindPosition(weight); |
| 87 | return Instruction(inst_ndx); |
| 88 | } |
| 89 | |
| 90 | |
| 91 |