public final class WeightedLink extends Object implements Link, Serializable

is the number of neurons in the source layer
is the k-th element in the source layer output
is the weight between i-th neuron in the target layer
and k-th neuron in the source layer. 
| Constructor and Description |
|---|
WeightedLink(Layer sourceLayer,
Layer targetLayer)
Creates a link using specified layers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Performs computations for this link.
|
boolean |
equals(Object obj) |
Layer |
getSource()
Returns a source layer.
|
Layer |
getTarget()
Return the target layer.
|
double |
getWeight(int toNeuron,
int fromNeuron)
Returns a weight between
toNeuron-th neuron in the target
layer and fromNeuron-th neuron in the source layer. |
int |
getWeightCount()
Returns the number of weights in this link.
|
int |
hashCode() |
void |
setWeight(int toNeuron,
int fromNeuron,
double weight)
Sets a weight between
toNeuron-th neuron in the target
layer and fromNeuron-th neuron in the source layer. |
public double getWeight(int toNeuron,
int fromNeuron)
LinktoNeuron-th neuron in the target
layer and fromNeuron-th neuron in the source layer.
I.e. returns the element
in
the weight matrix.public void setWeight(int toNeuron,
int fromNeuron,
double weight)
LinktoNeuron-th neuron in the target
layer and fromNeuron-th neuron in the source layer.
I.e. sets the element
in the
weight matrix to the given value.public int getWeightCount()
LinkgetWeightCount in interface Linkpublic void activate()
LinkCopyright © 2012. All Rights Reserved.