From 95f602b0a3f277d33e883d5d9132edef8301c20b Mon Sep 17 00:00:00 2001 From: fabolous005 Date: Mon, 6 Oct 2025 16:33:56 +0200 Subject: [PATCH] still just tructure --- src/main.rs | 3 +++ src/sensors/mod.rs | 1 + src/sensors/sight.rs | 24 ++++++++++++++++++++++++ src/structure/mod.rs | 4 ++-- src/structure/sensoric.rs | 20 ++++++++++++++------ 5 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 src/sensors/mod.rs create mode 100644 src/sensors/sight.rs diff --git a/src/main.rs b/src/main.rs index c6d95f2..52b37c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,9 @@ #![feature(allocator_api)] +#[allow(unused)] + mod structure; +mod sensors; fn main() { println!("Hello, world!"); diff --git a/src/sensors/mod.rs b/src/sensors/mod.rs new file mode 100644 index 0000000..b58144f --- /dev/null +++ b/src/sensors/mod.rs @@ -0,0 +1 @@ +pub mod sight; diff --git a/src/sensors/sight.rs b/src/sensors/sight.rs new file mode 100644 index 0000000..a2d674c --- /dev/null +++ b/src/sensors/sight.rs @@ -0,0 +1,24 @@ +use crate::structure::sensoric::Sensor; + + +/* +color +lines +pattern + => structures + +change rate of structures + => movement + +focus <= prediction +*/ +pub struct Sight; + +const SIZE: usize = 1024; + +impl Sensor for Sight { + + fn input(&self, input: [f32; SIZE]) { + todo!() + } +} diff --git a/src/structure/mod.rs b/src/structure/mod.rs index 3f55b1a..8c64d44 100644 --- a/src/structure/mod.rs +++ b/src/structure/mod.rs @@ -1,2 +1,2 @@ -mod neuron; -mod sensoric; +pub mod neuron; +pub mod sensoric; diff --git a/src/structure/sensoric.rs b/src/structure/sensoric.rs index 56acf1b..d9fe61d 100644 --- a/src/structure/sensoric.rs +++ b/src/structure/sensoric.rs @@ -1,13 +1,21 @@ + + /* - +For the first layer have a variable that determines the +stability of one mental image */ -trait Sensor { - type Packet; +// pub trait Sensor +// where +// Self::Packet: IntoIterator, +// { +// type Packet; +// +// fn input(&self, packet: Self::Packet); +// } - fn input(&self) -> Self::Packet; +pub trait Sensor { + fn input(&self, input: [f32; N]); } - -