org.encog.ml.prg.species

## Class CompareEncogProgram

- java.lang.Object
- - org.encog.ml.prg.species.CompareEncogProgram

-     public class CompareEncogProgram
      extends Object

  Compare two Encog programs for speciation. Count the nodes that are the different, the higher the compare value, the more different two genomes are. Only the opcodes are compared, the actual values are not. This causes the comparison to be more about structure than actual values. Two genomes with the same structure, and different values, can be identical.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompareEncogProgram()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `compare(EncogProgram prg1, EncogProgram prg2)` Compare program 1 and 2 node for node.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompareEncogProgram

          public CompareEncogProgram()

  - ### Method Detail

    - #### compare

          public double compare(EncogProgram prg1,
                       EncogProgram prg2)

      Compare program 1 and 2 node for node. Lower values mean more similar genomes.
      Parameters:
        `prg1` - The first program.
        `prg2` - The second program.
      Returns:
        The result of the compare.

Copyright © 2014. All Rights Reserved.