Skip to main content

ThermalConfig

Struct ThermalConfig 

Source
pub struct ThermalConfig {
    pub decay_rates: [Signal; 4],
    pub promotion_thresholds: [Signal; 4],
    pub demotion_thresholds: [Signal; 4],
    pub min_observations: [usize; 4],
    pub allow_demotion: [bool; 4],
    pub prune_threshold: Signal,
    pub crystallization_threshold: Signal,
    pub allow_warming: bool,
    pub warming_delta: Signal,
}
Expand description

Configuration for 4-temperature thermal transitions

All rates and thresholds use Signal (2-byte polarity + magnitude).

Fields§

§decay_rates: [Signal; 4]

Decay rates per temperature layer [hot, warm, cool, cold]

§promotion_thresholds: [Signal; 4]

Promotion thresholds (strength needed to promote) [hot, warm, cool, cold]

§demotion_thresholds: [Signal; 4]

Demotion thresholds (strength below which demotion occurs) [hot, warm, cool, cold]

§min_observations: [usize; 4]

Minimum observations before promotion eligible [hot, warm, cool, cold]

§allow_demotion: [bool; 4]

Whether each layer can be demoted [hot, warm, cool, cold]

§prune_threshold: Signal

Strength below which entries are pruned entirely

§crystallization_threshold: Signal

Minimum strength to crystallize (mapped to cool→cold promotion)

§allow_warming: bool

Whether warming is allowed

§warming_delta: Signal

Warming cost (strength reduction when warming cold→hot)

Implementations§

Source§

impl ThermalConfig

Source

pub fn fast_learner() -> Self

Create config optimized for fast learners (agents, workers)

Source

pub fn organic() -> Self

Create config optimized for organic emergence (gradual learning)

Source

pub fn decay_rate(&self, state: ThermalState) -> Signal

Get decay rate for a thermal state

Source

pub fn promotion_threshold(&self, state: ThermalState) -> Signal

Get promotion threshold for a thermal state

Source

pub fn demotion_threshold(&self, state: ThermalState) -> Signal

Get demotion threshold for a thermal state

Source

pub fn min_obs(&self, state: ThermalState) -> usize

Get min observations for a thermal state

Source

pub fn can_demote(&self, state: ThermalState) -> bool

Check if demotion is allowed for a thermal state

Trait Implementations§

Source§

impl Clone for ThermalConfig

Source§

fn clone(&self) -> ThermalConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ThermalConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ThermalConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ThermalConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ThermalConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,