public final class WeightedLink extends Object implements Link, Serializable
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)
Link
toNeuron-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)
Link
toNeuron-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()
Link
getWeightCount
in interface Link
public void activate()
Link
Copyright © 2012. All Rights Reserved.