pub struct LexicalCost;Expand description
The v1 default cost model: 1 - gestalt_ratio over the steps’ token sequences.
A step’s comparable text is "{name}: {outputs}" capped at [TEXT_CAP] characters —
outputs only, not inputs, because outputs carry the step’s observable behavior while inputs
largely echo the previous step’s outputs (spike 001 design, kept). The text is tokenized to
lowercase ASCII-alphanumeric runs, the same vocabulary a future tf-idf model would use.
Its prepared form is the token sequence itself, so a full alignment tokenizes each step once (O(n+m)) and the O(n·m) cells spend only the gestalt ratio (issue #16; before/after curves in notebook 022/023).
Trait Implementations§
Source§impl Clone for LexicalCost
impl Clone for LexicalCost
Source§fn clone(&self) -> LexicalCost
fn clone(&self) -> LexicalCost
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 moreimpl Copy for LexicalCost
Source§impl CostModel for LexicalCost
impl CostModel for LexicalCost
Source§impl Debug for LexicalCost
impl Debug for LexicalCost
Source§impl Default for LexicalCost
impl Default for LexicalCost
Source§fn default() -> LexicalCost
fn default() -> LexicalCost
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LexicalCost
impl RefUnwindSafe for LexicalCost
impl Send for LexicalCost
impl Sync for LexicalCost
impl Unpin for LexicalCost
impl UnsafeUnpin for LexicalCost
impl UnwindSafe for LexicalCost
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