mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
21 lines
291 B
Plaintext
21 lines
291 B
Plaintext
class Connection {
|
|
float weight;
|
|
Neuron a;
|
|
Neuron b;
|
|
|
|
Connection(Neuron from, Neuron to,float w) {
|
|
weight = w;
|
|
a = from;
|
|
b = to;
|
|
}
|
|
|
|
void display() {
|
|
stroke(0);
|
|
strokeWeight(weight*4);
|
|
line(a.location.x, a.location.y, b.location.x, b.location.y);
|
|
}
|
|
}
|
|
|
|
|
|
|