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

## org.encog.neural.neat.training
Class NEATLinkGene

    java.lang.Object
      org.encog.ml.genetic.genes.BasicGene
          org.encog.neural.neat.training.NEATLinkGene

All Implemented Interfaces:
  Serializable, Comparable<Gene>, Gene

    public class NEATLinkGene

extends BasicGene
implements Serializable

Implements a NEAT link gene. This describes a way in which two neurons are linked. NeuroEvolution of Augmenting Topologies (NEAT) is a genetic algorithm for the generation of evolving artificial neural networks. It was developed by Ken Stanley while at The University of Texas at Austin. http://www.cs.ucf.edu/~kstanley/

See Also:
  Serialized Form

Constructor Summary
`NEATLinkGene()` Default constructor, used mainly for persistence.
`NEATLinkGene(long fromNeuronID, long toNeuronID, boolean enabled, long innovationID, double weight, boolean recurrent)` Construct a NEAT link gene.

Method Summary
`void` | `copy(Gene gene)` Copy from another gene.
`long` | `getFromNeuronID()`
`long` | `getToNeuronID()`
`double` | `getWeight()`
`boolean` | `isRecurrent()`
`void` | `setFromNeuronID(int i)`
`void` | `setRecurrent(boolean b)`
`void` | `setToNeuronID(int i)`
`void` | `setWeight(double weight)` Set the weight of this connection.
`String` | `toString()`

Methods inherited from class org.encog.ml.genetic.genes.BasicGene
`compareTo, getId, getInnovationId, isEnabled, setEnabled, setId, setInnovationId`

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

Constructor Detail

### NEATLinkGene

    public NEATLinkGene()

  Default constructor, used mainly for persistence.

### NEATLinkGene

    public NEATLinkGene(long fromNeuronID,
                        long toNeuronID,
                        boolean enabled,
                        long innovationID,
                        double weight,
                        boolean recurrent)

  Construct a NEAT link gene.

  Parameters:
    `fromNeuronID` - The source neuron.
    `toNeuronID` - The target neuron.
    `enabled` - Is this link enabled.
    `innovationID` - The innovation id.
    `weight` - The weight.
    `recurrent` - Is this a recurrent link?

Method Detail

### copy

    public void copy(Gene gene)

  Copy from another gene.

  Specified by:
    `copy` in interface `Gene`
  Parameters:
    `gene` - The other gene.

### getFromNeuronID

    public long getFromNeuronID()

  Returns:
    The from neuron id.

### getToNeuronID

    public long getToNeuronID()

  Returns:
    The to neuron id.

### getWeight

    public double getWeight()

  Returns:
    The weight of this connection.

### isRecurrent

    public boolean isRecurrent()

  Returns:
    True if this is a recurrent link.

### setWeight

    public void setWeight(double weight)

  Set the weight of this connection.

  Parameters:
    `weight` - The connection weight.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### setFromNeuronID

    public void setFromNeuronID(int i)

### setToNeuronID

    public void setToNeuronID(int i)

### setRecurrent

    public void setRecurrent(boolean b)

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

Copyright © 2011. All Rights Reserved.