Skip to main content

RuleCandidates

Struct RuleCandidates 

Source
pub struct RuleCandidates { /* private fields */ }

Implementations§

Source§

impl RuleCandidates

Source

pub fn new( centers: Vec<f64>, rows: Vec<(f64, usize, [f64; 4], Vec<i64>)>, ) -> Result<Self, &'static str>

一次验证并保存有限纯数值走廊;横线必须严格递增,不删除或重排任何行。

Source

pub fn short_intervals( &self, first: usize, count: usize, height: f64, ) -> Result<bool, &'static str>

按原横线中心完整核验短区间条件,不改变任何列统计或候选认领结果。

Source

pub fn segments( &self, start: usize, end: usize, height: f64, ) -> Result<Vec<Vec<usize>>, &'static str>

同一不可变走廊内稳定按行中心排序并分段,所有成员仍保留且不缓存最终候选。

Source

pub fn partition( &self, start: usize, end: usize, first: usize, rule_count: usize, height: f64, ) -> Result<(Vec<Vec<usize>>, bool), &'static str>

保留共享横线两侧的双归属,在同一行扫描中收集多单元证据,不调用 Python。

Source

pub fn core( &self, start: usize, end: usize, rules: &[[f64; 4]], ) -> Result<(Vec<i64>, [usize; 4]), &'static str>

按首次出现顺序收集成员,并返回核心并集四个坐标的来源,保留 Python 坐标对象与负零。

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.