module.exports =
{
  mutationFunction: function(phenotype)
  {
    // make a random change to phenotype
    var count = phenotype.nmos + phenotype.pmos
    var randNumb = Math.floor(Math.random() * (count + 1))

    if (randNumb < Math.floor(count/2))
      phenotype.nmosTransistors[randNumb].srcLeft = !phenotype.nmosTransistors[randNumb].srcLeft
    else
      phenotype.pmosTransistors[count-randNumb].srcLeft = !phenotype.pmosTransistors[count-randNumb].srcLeft

    return phenotype
  }
}

module.exports =
{
  mutationFunction: function(phenotype)
  {
    // make a random change to phenotype
    var count = Math.floor((phenotype.nmos + phenotype.pmos)/2)
    var randNumb = Math.floor(Math.random() * count * 2)

    if (randNumb < count)
      phenotype.nmosTransistors[randNumb].srcLeft = !phenotype.nmosTransistors[randNumb].srcLeft
    else
      phenotype.pmosTransistors[randNumb-count].srcLeft = !phenotype.pmosTransistors[randNumb-count].srcLeft

    return phenotype
  }
}

Enhance Functionality of Mutation Function
Enhance Functionality of Mutation Function
