pub struct NeuroSymbolicSieve { /* private fields */ }Expand description
Neuro-symbolic grammar sieve (masks built once from tokenizer + lex — cold path may alloc).
Implementations§
Source§impl NeuroSymbolicSieve
impl NeuroSymbolicSieve
Sourcepub fn from_lex_and_tokenizer(
lex: &Q42LexMmap<'_>,
tok: &GgufTokenizer,
spec: &SieveLexSpec,
) -> Self
pub fn from_lex_and_tokenizer( lex: &Q42LexMmap<'_>, tok: &GgufTokenizer, spec: &SieveLexSpec, ) -> Self
Build masks from a memory-mapped .q42.lex view and GGUF tokenizer (load-time only).
Sourcepub fn from_gguf_tokenizer(tok: &GgufTokenizer) -> Self
pub fn from_gguf_tokenizer(tok: &GgufTokenizer) -> Self
Tokenizer-only fallback when no .q42.lex sidecar is loaded (dev / tests).
pub fn state(&self) -> SieveState
pub fn is_complete(&self) -> bool
pub fn emitted_len(&self) -> u8
pub fn current_mask(&self) -> &SieveStateMask
Sourcepub fn apply_token(&mut self, token_id: u32) -> Result<(), SieveError>
pub fn apply_token(&mut self, token_id: u32) -> Result<(), SieveError>
Apply a sieve-selected token and advance the FSM.
Sourcepub fn assemble_quin(&self, context_hash: u64) -> NQuin
pub fn assemble_quin(&self, context_hash: u64) -> NQuin
Assemble the 48-byte NQuin from constrained emissions (stack only).
pub fn masks_ready(&self) -> bool
Trait Implementations§
Source§impl Clone for NeuroSymbolicSieve
impl Clone for NeuroSymbolicSieve
Source§fn clone(&self) -> NeuroSymbolicSieve
fn clone(&self) -> NeuroSymbolicSieve
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NeuroSymbolicSieve
impl RefUnwindSafe for NeuroSymbolicSieve
impl Send for NeuroSymbolicSieve
impl Sync for NeuroSymbolicSieve
impl Unpin for NeuroSymbolicSieve
impl UnsafeUnpin for NeuroSymbolicSieve
impl UnwindSafe for NeuroSymbolicSieve
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more