Skip to main content

MinFill

Struct MinFill 

Source
pub struct MinFill;
Expand description

Approximate Minimum Fill metric (HAMF4) — Amestoy 1999 thesis.

AMF selects the next pivot to minimise the fill introduced by the elimination, rather than the candidate’s degree. On bipartite- KKT graphs with a few “hub” rows AMF can be 47× better than AMD on final nnz_L (see dev/research/amf-clean-room.md Section 1).

Score is a quantized RMF = DEG*(DEG-1+2*DEGME) - WF(i) value stored in i32. Buckets up to and including NORIG = n are one bucket per integer score; above NORIG the buckets quantize with stride PAS = max(n / 8, 1) and the head must be linear-scanned to pick the minimum-RMF entry. Supervariable absorption merges the per-supervariable WF with max.

Inner loop: MinFill::run_elimination dispatches to run_elimination_amf (Phase B.2 of dev/plans/amf-clean-room.md). The lazy WF(e) cache, three-accumulator Pass-2, supervariable max-merge of wf, saturated/regular RMF branch, and coarse-bucket linear scan all live in algo.rs.

Trait Implementations§

Source§

impl Clone for MinFill

Source§

fn clone(&self) -> MinFill

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 MinFill

Source§

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

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

impl Default for MinFill

Source§

fn default() -> MinFill

Returns the “default value” for a type. Read more
Source§

impl Metric for MinFill

Source§

fn n_buckets(n: usize) -> usize

AMF needs 2 * n + 2 slots: 0..=NORIG for one-per-score fine buckets, NORIG+1..=NBBUCK (NBBUCK = 2 * n) for coarse-stride buckets, and one halo slot at NBBUCK + 1 reserved for V1 boundary variables (inert in our use case; see Section 11 of dev/research/amf-clean-room.md).

Source§

fn init_score(len: i32) -> i32

Seed the per-supervariable score with the row’s adjacency length len(i). Same seeding as AMD; the AMF metric only diverges once the elimination loop starts producing elements.

Source§

fn bucket(score: i32, n: usize) -> usize

Quantize score into a bucket index.

0..=n are fine buckets (one per integer score). Above n the buckets are coarse with stride PAS = max(n / 8, 1), capped at NBBUCK = 2 * n. Negative scores (which should not occur in a well-formed AMF run, but we defend against truncation underflow on RMF / (NVI + 1)) clamp to bucket 0.

Reference: ana_orderings.F:4954-5017 and dev/research/amf-clean-room.md Section 4.

Source§

fn coarse_bucket(idx: usize, n: usize) -> bool

Coarse buckets are those above NORIG = n. select_pivot must walk the bucket chain and pick the entry with the smallest exact score (ana_orderings.F:4392-4418).

Source§

fn merge_supervariable(parent: &mut i32, child: i32)

On supervariable merge j → i, update the surviving anchor’s score with max(WF(i), WF(j)) (ana_orderings.F:4920).

Source§

type Score = i32

Bucket key produced by the selection metric. AMD uses i32 (the running degree); AMF will also use i32 (quantized RMF).
Source§

fn run_elimination( ws: &mut Workspace, aggressive: bool, ) -> Result<StepFlops, OrderingError>

Run the metric’s elimination loop on a freshly initialised Workspace. Returns the accumulated flop counters. Read more
Source§

impl Copy for MinFill

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.