public abstract class Topology extends java.lang.Object implements java.lang.Cloneable, Storable
| Modifier and Type | Field and Description |
|---|---|
protected static int |
EMPTY |
protected NeuralNet |
net
The associated network.
|
| Constructor and Description |
|---|
Topology()
Creates the Topology.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addNeighbor(int id)
Adds a neighbor to the neighbor list.
|
abstract boolean |
arrangeNeurons()
Arranges the output neurons of the net according to the topology.
|
protected abstract void |
clearMap()
Clears the distance map (set to EMPTY).
|
Topology |
clone()
A clone keeping the reference to the same network and the same neighbor list.
|
java.util.List<Neuron> |
getNeighbors(Neuron neuron,
int radius)
Returns all neighbors within a given 'radius' of the given neuron.
|
NeuralNet |
getNet()
Returns the associated net.
|
abstract int[] |
getNeurons()
Returns the dimensions of the map.
|
abstract double[] |
getSizes()
Returns the size (length) of each dimension of the map.
|
abstract int |
getTotalNeurons()
Returns the total number of map neurons.
|
protected abstract void |
searchNeighbors(int index,
int radius)
Sets the map at the given neuron index to value.
|
protected abstract void |
setMapValue(int index,
int value)
Sets the map at the given neuron index to value.
|
void |
setNet(NeuralNet net)
Sets the associated net.
|
org.jdom2.Element |
toXML(org.jdom2.Element element)
Writes common topology attributes to a new child element.
|
protected static final int EMPTY
protected NeuralNet net
public Topology clone()
clone in class java.lang.Objectpublic NeuralNet getNet()
public void setNet(NeuralNet net)
net - a netpublic java.util.List<Neuron> getNeighbors(Neuron neuron, int radius)
neuron - a neuronradius - the neighborhood radiuspublic abstract boolean arrangeNeurons()
protected void addNeighbor(int id)
id - the neuron indexpublic abstract int[] getNeurons()
public abstract double[] getSizes()
protected abstract void setMapValue(int index,
int value)
index - a neuron indexvalue - the map valuepublic abstract int getTotalNeurons()
protected abstract void clearMap()
protected abstract void searchNeighbors(int index,
int radius)
index - a neuron indexradius - the neighborhood radius