pub struct Activity {
pub values: Vec<f64>,
}Expand description
One activity value per site.
Fields§
§values: Vec<f64>Steps of memory remaining at each site.
Implementations§
Source§impl Activity
impl Activity
Sourcepub fn refresh(&mut self, site: usize, max_activity: f64)
pub fn refresh(&mut self, site: usize, max_activity: f64)
Give a site the full memory a type states.
Sourcepub fn neighbourhood_mean(
&self,
lattice: &Lattice,
site: usize,
label: u32,
) -> f64
pub fn neighbourhood_mean( &self, lattice: &Lattice, site: usize, label: u32, ) -> f64
Geometric mean of the activity over the sites of label around
site, counting the site itself.
Zero when any of them has forgotten, which is what makes the memory a front. A site whose cell has no other site nearby reads its own value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnsafeUnpin for Activity
impl UnwindSafe for Activity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more