| Modifier and Type | Class and Description |
|---|---|
| private static class | Neuron.
Serialization. |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicReference | features
Neuron data. |
| private final long | identifier
Identifier. |
| private final AtomicLong | numberOfAttemptedUpdates
Number of attempts to update a neuron. |
| private final AtomicLong | numberOfSuccessfulUpdates
Number of successful updates of a neuron. |
| private static final long | serialVersionUID
Serializable. |
| private final int | size
Length of the feature set. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the update was successful, false
otherwise.Current values of the features, as assumed by the caller.
Update will never succeed if the contents of this array does not match
the values returned by expect, double[] getFeatures().Features's new values. update)Tries to atomically update the neuron's features. |
| private boolean | Returns: true if the arrays contain the same values.Current values. current, double[] Expected values. expect)Checks whether the contents of both arrays is the same. |
| public synchronized Neuron | Returns: a new instance with the same state as this instance.Performs a deep copy of this instance. |
| public double[] | |
| public long | |
| public long | Returns: the number of update attempts.Retrieves the number of calls to the
|
| public long | Returns: the number of successful updates.Retrieves the number of successful calls to the
|
| public int | |
| private void | |
| private Object |
| features | back to summary |
|---|---|
| private final AtomicReference<double[]> features Neuron data. | |
| identifier | back to summary |
|---|---|
| private final long identifier Identifier. | |
| numberOfAttemptedUpdates | back to summary |
|---|---|
| private final AtomicLong numberOfAttemptedUpdates Number of attempts to update a neuron. | |
| numberOfSuccessfulUpdates | back to summary |
|---|---|
| private final AtomicLong numberOfSuccessfulUpdates Number of successful updates of a neuron. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable. | |
| size | back to summary |
|---|---|
| private final int size Length of the feature set. | |
| Neuron | back to summary |
|---|---|
| pack-priv Neuron(long identifier, double[] features) Creates a neuron.
The size of the feature set is fixed to the length of the given
argument.
| |
| compareAndSetFeatures | back to summary |
|---|---|
| public boolean compareAndSetFeatures(double[] expect, double[] update) Tries to atomically update the neuron's features.
Update will be performed only if the expected values match the
current values.
| |
| containSameValues | back to summary |
|---|---|
| private boolean containSameValues(double[] current, double[] expect) Checks whether the contents of both arrays is the same.
| |
| copy | back to summary |
|---|---|
| public synchronized Neuron copy() Performs a deep copy of this instance. Upon return, the copied and original instances will be independent: Updating one will not affect the other.
| |
| getFeatures | back to summary |
|---|---|
| public double[] getFeatures() Gets the neuron's features.
| |
| getIdentifier | back to summary |
|---|---|
| public long getIdentifier() Gets the neuron's identifier.
| |
| getNumberOfAttemptedUpdates | back to summary |
|---|---|
| public long getNumberOfAttemptedUpdates() Retrieves the number of calls to the
| |
| getNumberOfSuccessfulUpdates | back to summary |
|---|---|
| public long getNumberOfSuccessfulUpdates() Retrieves the number of successful calls to the
| |
| getSize | back to summary |
|---|---|
| public int getSize() Gets the length of the feature set.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) Prevents proxy bypass.
| |
| writeReplace | back to summary |
|---|---|
| private Object writeReplace() Custom serialization.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final double[] | features
Features. |
| private final long | identifier
Identifier. |
| private static final long | serialVersionUID
Serializable. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private Object |
| features | back to summary |
|---|---|
| private final double[] features Features. | |
| identifier | back to summary |
|---|---|
| private final long identifier Identifier. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable. | |
| SerializationProxy | back to summary |
|---|---|
pack-priv SerializationProxy(long identifier, double[] features)
| |
| readResolve | back to summary |
|---|---|
| private Object readResolve() Custom serialization. | |