FileDocCategorySizeDatePackage
Fitness.javaAPI DocExample443Thu Apr 06 17:27:56 BST 2000None

Fitness

public class Fitness extends Object

Fields Summary
Constructors Summary
Methods Summary
public static doubleget(int[][] arrayBody, int row, int colMax)

    //Let's try an easy one. The more ones, the better
    int intFit = 0;
    for(int i=0; i<colMax; i++) {
      if(arrayBody[row][i]==1) {intFit++;}
    }
    //normalise and return
    return ((double)intFit)/((double)(colMax));