-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNeuron.java
More file actions
46 lines (30 loc) · 732 Bytes
/
Neuron.java
File metadata and controls
46 lines (30 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
public class Neuron {
private int id;
private double Value = 0.0;
private double[] Weight;
public Neuron(int id){
this.id = id;
}
public int GetId() {
return this.id;
}
public double[] GetWeight() {
return this.Weight;
}
public void SetWeight(double[] Weight) {
this.Weight = new double[Weight.length];
this.Weight = Weight;
}
public double GetValue(){
return this.Value;
}
public void UpdateWeight(double NewWeight, int Position){
this.Weight[Position] = NewWeight;
}
public void Input(double Value){
this.Value = Value;
Activation();
}
public void Activation(){
}
}