pub struct FlowField {
pub n_tokens: usize,
pub spans: Vec<(usize, usize)>,
pub frames: Vec<FlowFrame>,
pub reversals: Vec<usize>,
}Expand description
The dynamics side table, keyed by byte offset.
Fields§
§n_tokens: usizeToken count.
spans: Vec<(usize, usize)>Byte span per token - the byte-offset key.
frames: Vec<FlowFrame>One frame per token.
reversals: Vec<usize>Reversal byte offsets: where the trend flips between rising and falling.
Implementations§
Source§impl FlowField
impl FlowField
Sourcepub fn direction_at(&self, byte: usize) -> i8
pub fn direction_at(&self, byte: usize) -> i8
The trend direction at byte (-1 / 0 / +1).
Sourcepub fn momentum_at(&self, byte: usize) -> u16
pub fn momentum_at(&self, byte: usize) -> u16
The trend persistence at byte: consecutive tokens up to it holding the
same non-steady direction. Counts back past the caller’s span, because
it is a property of the position rather than of any window over it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowField
impl RefUnwindSafe for FlowField
impl Send for FlowField
impl Sync for FlowField
impl Unpin for FlowField
impl UnsafeUnpin for FlowField
impl UnwindSafe for FlowField
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