public abstract class AbstractNeuralNet extends Object implements NeuralNet, Serializable
getInputLinks and getOutputLinks methods run in constant time.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractNeuralNet(Layer inputLayer,
Layer outputLayer,
Set<Layer> layers,
Set<Link> links)
Creates an instance of a neural network.
|
| Modifier and Type | Method and Description |
|---|---|
Layer |
getInputLayer()
Returns the input layer of this network.
|
Set<Link> |
getInputLinks(Layer layer)
Returns input links of the specified layer.
|
int |
getInputSize()
Returns the size of the input layer.
|
int |
getLayerCount()
Returns the number of all layers in this network.
|
Set<Layer> |
getLayers()
Returns a set of all layers in this network.
|
Set<Link> |
getLinks()
Returns a set of all links in this network.
|
Link |
getOneInputLink(Layer layer)
Returns one of input links of the specified layer.
|
Link |
getOneOutputLink(Layer layer)
Returns one of output links of the specified layer.
|
Layer |
getOutputLayer()
Returns the output layer of this network.
|
Set<Link> |
getOutputLinks(Layer layer)
Returns output links of the specified layer.
|
int |
getOutputSize()
Returns the size of the output layer.
|
boolean |
hasInputLinks(Layer layer)
Returns
true if the specified layer has at least one input link. |
boolean |
hasOutputLinks(Layer layer)
Returns
true if the specified layer has at least one output
link. |
protected void |
initialize() |
String |
toString() |
protected AbstractNeuralNet(Layer inputLayer, Layer outputLayer, Set<Layer> layers, Set<Link> links)
layers - the list of layers.links - the set of links between layers.inputLayer - the network's input layer.outputLayer - the network's output layer.public int getInputSize()
NeuralNetgetInputSize in interface NeuralNetpublic int getOutputSize()
NeuralNetgetOutputSize in interface NeuralNetpublic Layer getInputLayer()
NeuralNetgetInputLayer in interface NeuralNetpublic Layer getOutputLayer()
NeuralNetgetOutputLayer in interface NeuralNetpublic boolean hasInputLinks(Layer layer)
NeuralNettrue if the specified layer has at least one input link.hasInputLinks in interface NeuralNetlayer - the examinated layer. Cannot be null.true - if specified layer has at least one input linkfalse - if specified layer has no input links, doesn't
belong to this networkpublic boolean hasOutputLinks(Layer layer)
NeuralNettrue if the specified layer has at least one output
link.hasOutputLinks in interface NeuralNetlayer - the examinated layer. Cannot be null.true - if specified layer has at least one output linkfalse - if specified layer has no input links or doesn't
belong to this networkpublic Set<Link> getInputLinks(Layer layer)
NeuralNetgetInputLinks in interface NeuralNetlayer - the examinated layer. Cannot be null.public Set<Link> getOutputLinks(Layer layer)
NeuralNetgetOutputLinks in interface NeuralNetlayer - the layer. Cannot be null.public Link getOneInputLink(Layer layer)
NeuralNetnull is returned.
getOneInputLink in interface NeuralNetlayer - the examinated layer. Cannot be null.null - if the layer has no input links or doesn't belong
to this network public Link getOneOutputLink(Layer layer)
NeuralNetnull is returned.
getOneOutputLink in interface NeuralNetlayer - the layer. Cannot be null.null - if the layer has no output links or doesn't belong
to this network public Set<Layer> getLayers()
NeuralNetpublic Set<Link> getLinks()
NeuralNetpublic int getLayerCount()
NeuralNetgetLayerCount in interface NeuralNetprotected void initialize()
Copyright © 2012. All Rights Reserved.