org.encog.neural.neat.training
public class NEATLinkGene extends NEATBaseGene implements Serializable
| Constructor and Description |
|---|
NEATLinkGene()
Default constructor, used mainly for persistence.
|
NEATLinkGene(long fromNeuronID,
long toNeuronID,
boolean enabled,
long innovationID,
double weight)
Construct a NEAT link gene.
|
NEATLinkGene(NEATLinkGene other) |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(NEATLinkGene gene)
Copy from another gene.
|
long |
getFromNeuronID() |
long |
getToNeuronID() |
double |
getWeight() |
boolean |
isEnabled() |
void |
setEnabled(boolean e) |
void |
setFromNeuronID(int i)
Set the from neuron id.
|
void |
setToNeuronID(int i)
Set the to neuron id.
|
void |
setWeight(double weight)
Set the weight of this connection.
|
String |
toString() |
compareTo, getId, getInnovationId, setId, setInnovationIdpublic NEATLinkGene()
public NEATLinkGene(long fromNeuronID,
long toNeuronID,
boolean enabled,
long innovationID,
double weight)
fromNeuronID - The source neuron.toNeuronID - The target neuron.enabled - Is this link enabled.innovationID - The innovation id.weight - The weight.public NEATLinkGene(NEATLinkGene other)
public void copy(NEATLinkGene gene)
gene - The other gene.public long getFromNeuronID()
public long getToNeuronID()
public double getWeight()
public void setWeight(double weight)
weight - The connection weight.public void setFromNeuronID(int i)
i - The from neuron id.public void setToNeuronID(int i)
i - The to neuron id.public boolean isEnabled()
public void setEnabled(boolean e)
e - True, if this gene is enabled.Copyright © 2014. All Rights Reserved.