Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## FitnessEvaluation.HelloWorld
Class WorldWriter

    java.lang.Object
      FitnessEvaluation.HelloWorld.WorldWriter

    public class WorldWriter

extends java.lang.Object

Class to be extended by HelloWorldBSF Contains methods for appending, printing and calculating the fitness compared to "geva"

Field Summary
`static java.lang.String` | `s`

Constructor Summary
`WorldWriter()` Create an instance

Method Summary
`double` | `calculateFitness()` Compare a string.
`void` | `writeChar(char c)` Append a char to the string
`void` | `writeChar(java.util.HashMap c)` Append a char to the string from a hashmap
`void` | `writeChar(java.lang.String c)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### s

    public static java.lang.String s

Constructor Detail

### WorldWriter

    public WorldWriter()

  Create an instance

Method Detail

### writeChar

    public void writeChar(char c)

  Append a char to the string

  Parameters:
    `c` - char to append

### writeChar

    public void writeChar(java.lang.String c)

### writeChar

    public void writeChar(java.util.HashMap c)

  Append a char to the string from a hashmap

  Parameters:
    `c` - structure containg a char

### calculateFitness

    public double calculateFitness()

  Compare a string. Each symbol not matching increases the fitness by 1. The length difference between the string and the sought string is added to the fitness

  Returns:
    Number of missmatches

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD