still just tructure
This commit is contained in:
parent
eb194e8b4e
commit
95f602b0a3
@ -1,6 +1,9 @@
|
|||||||
#![feature(allocator_api)]
|
#![feature(allocator_api)]
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
|
||||||
mod structure;
|
mod structure;
|
||||||
|
mod sensors;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
|
|||||||
1
src/sensors/mod.rs
Normal file
1
src/sensors/mod.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub mod sight;
|
||||||
24
src/sensors/sight.rs
Normal file
24
src/sensors/sight.rs
Normal file
@ -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<SIZE> for Sight {
|
||||||
|
|
||||||
|
fn input(&self, input: [f32; SIZE]) {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,2 +1,2 @@
|
|||||||
mod neuron;
|
pub mod neuron;
|
||||||
mod sensoric;
|
pub mod sensoric;
|
||||||
|
|||||||
@ -1,13 +1,21 @@
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
For the first layer have a variable that determines the
|
||||||
|
stability of one mental image
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
trait Sensor {
|
// pub trait Sensor
|
||||||
type Packet;
|
// where
|
||||||
|
// Self::Packet: IntoIterator,
|
||||||
|
// {
|
||||||
|
// type Packet;
|
||||||
|
//
|
||||||
|
// fn input(&self, packet: Self::Packet);
|
||||||
|
// }
|
||||||
|
|
||||||
fn input(&self) -> Self::Packet;
|
pub trait Sensor<const N: usize> {
|
||||||
|
fn input(&self, input: [f32; N]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user