-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands.rs
More file actions
30 lines (28 loc) · 834 Bytes
/
commands.rs
File metadata and controls
30 lines (28 loc) · 834 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
//! Commands describing intent to change the domain state.
use crate::domain::Activation;
use uuid::Uuid;
/// Write-side operations handled by the [`CommandHandler`].
#[derive(Debug, Clone)]
pub enum Command {
/// Create a neuron with the specified identifier and activation.
CreateNeuron {
/// Identifier of the neuron to create.
id: Uuid,
/// Activation function assigned to the neuron.
activation: Activation,
},
/// Remove a neuron by its identifier.
RemoveNeuron {
/// Identifier of the neuron to remove.
id: Uuid,
},
/// Create a synapse between two existing neurons.
CreateSynapse {
id: Uuid,
from: Uuid,
to: Uuid,
weight: f64,
},
/// Delete a synapse by its identifier.
RemoveSynapse { id: Uuid },
}