public final class ModulatedSynapseImp extends Object implements ModulatedSynapse
This implementation optimizes read performance at the expense of write performance. The accessor methods are fast but the modulation factor mutator methods are slow. Use this implementation when the modulation factors are changed infrequently relative to the number of times the modulated weight is accessed.
This implementation conserves memory by using lazy initialization and by releasing memory allocated to internal data structures when empty.
ModulatedSynapseImp can be used as the default implementation for accessor interface Synapse because its memory consumption and read access performance is similar to MutableSynapseImp when modulation is not used.
MutableSynapseImp| Constructor and Description |
|---|
ModulatedSynapseImp(int targetNeuronIndex,
byte type,
float unmodulatedWeight) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearModulationFactors()
The weight is immediately restored to the unmodulated value.
|
int |
compareTo(Synapse other) |
int |
getTargetNeuronIndex() |
byte |
getType() |
float |
getWeight() |
void |
setModulationFactor(String name,
Double peakFactor)
The modulation factor is applied immediately to the weight.
|
String |
toString() |
public ModulatedSynapseImp(int targetNeuronIndex, byte type, float unmodulatedWeight)
public int getTargetNeuronIndex()
getTargetNeuronIndex in interface Synapsepublic void clearModulationFactors()
ModulatedSynapseclearModulationFactors in interface ModulatedSynapsepublic void setModulationFactor(String name, Double peakFactor)
ModulatedSynapsesetModulationFactor in interface ModulatedSynapsepublic int compareTo(Synapse other)
compareTo in interface Comparable<Synapse>