Skip to main content

MotifClass

Enum MotifClass 

Source
#[repr(u8)]
pub enum MotifClass {
Show 16 variants ResidualSpike = 0, SustainedResidualElevation = 1, DriftRamp = 2, SlewShock = 3, Plateau = 4, Oscillation = 5, DeadbandExit = 6, ErrorRateBurst = 7, LatencyErrorCoupling = 8, EntityLocalAnomaly = 9, RouteLocalAnomaly = 10, FanoutPrecursor = 11, VarianceExpansion = 12, RecoveryEdge = 13, CleanWindowStability = 14, ConfuserLikeTransient = 15,
}
Expand description

The deterministic catalog of detector motifs. Sixteen entries, all in canonical order. Bit i of a DetectorCell::detector_mask is 1 when MOTIF_CATALOG[i].class fired on that cell.

Variants§

§

ResidualSpike = 0

Single-cell norm above the spike threshold.

§

SustainedResidualElevation = 1

EWMA drift above the sustained threshold.

§

DriftRamp = 2

Monotonically increasing drift for ≥ ramp-steps windows.

§

SlewShock = 3

Absolute slew above the shock threshold.

§

Plateau = 4

Norm above plateau threshold and slew near zero for ≥ plateau-windows.

§

Oscillation = 5

Sign of slew alternated ≥ oscillation-alternations times in last oscillation-window cells.

§

DeadbandExit = 6

Norm crossed from below deadband to above deadband + hysteresis.

§

ErrorRateBurst = 7

Residual error rate above the burst threshold.

§

LatencyErrorCoupling = 8

Latency residual AND error residual both above their coupling thresholds within the same cell.

§

EntityLocalAnomaly = 9

Cell’s norm is markedly above the entity’s running average — set in the consensus stage; the per-cell evaluator records a candidate-flag and lets the consensus pass confirm or reject it.

§

RouteLocalAnomaly = 10

Cell’s norm is markedly above the entity’s average for other routes — placeholder bit, set when route_id distribution within the entity is uneven on this window.

§

FanoutPrecursor = 11

Drift rising in an upstream entity while this cell shows elevated error rate. v0 uses a conservative single-cell approximation.

§

VarianceExpansion = 12

Sample variance of norm over the variance-window cells above var_threshold.

§

RecoveryEdge = 13

Drift turning over (current drift < previous drift) while norm still elevated — signals recovery off a peak.

§

CleanWindowStability = 14

Norm and drift both below the deadband; no other detector fired. Sentinel bit used by consensus to confirm “clean” cells.

§

ConfuserLikeTransient = 15

Single-cell spike that resolved in the very next window — used by the confuser-suppression axis.

Implementations§

Source§

impl MotifClass

Source

pub const COUNT: usize = 16

Total number of motifs in the canonical catalog. Doubles as the width of detector_mask.

Source

pub const fn bit_index(self) -> u32

Map a class to its bit position in detector_mask.

Source

pub const fn bit_mask(self) -> u32

Map a class to a 1u32 << bit_index mask.

Source

pub const fn from_bit_index(bit: u32) -> Option<Self>

Recover a class from its bit index. Returns None for any value ≥ COUNT.

Source

pub const fn name(self) -> &'static str

Human-readable name. Used by the case-file serializer and any future operator-facing renderer. Stable strings; renaming any of them changes the registry hash and is therefore a contract breach.

Trait Implementations§

Source§

impl Clone for MotifClass

Source§

fn clone(&self) -> MotifClass

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for MotifClass

Source§

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

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

impl PartialEq for MotifClass

Source§

fn eq(&self, other: &MotifClass) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for MotifClass

Source§

impl Eq for MotifClass

Source§

impl StructuralPartialEq for MotifClass

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, 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.