pub fn create_element(
ws: &mut Workspace,
me: usize,
) -> Result<(usize, usize, i32, usize), OrderingError>Expand description
Build the new element me by merging the (variable) tail of
me’s list with every element e already in me’s list.
On success returns (pme1, pme2_excl, nvpiv, degme):
pme1..pme2_exclis the contiguous region inws.iwholding the new element’s variable members (supervariables, listed once each). Exclusive end so the empty case (pme2_excl == pme1) is representable inusizewithout underflow.nvpivis the supervariable count of the pivot.degmeis the tentative new element’s external degree (sum ofnv[i]over the assembled variables, before any absorption correction made by Pass-2).
Post-conditions also persisted on the workspace:
nv[me] = -nvpiv(marker — Pass-2 will flip sign back via-nv[i]).nv[i] = -nv[i]for everyiassembled into the new element (ditto — marker for Pass-2’s w-seed walk).pe[me] = pme1,len[me] = pme2 - pme1 + 1,elen[me] = flip(nvpiv + degme)(dead-variable sentinel carrying the pivot-front size for the postorder phase).degree[me] = degme(temporary; Pass-2 overwrites).- For every absorbed element
e != mein the elenme>0 branch:pe[e] = flip(me),w[e] = 0. This is standard absorption (faeramd.rs:355-358) — it fires unconditionally at eachknt1iter’s end. Aggressive absorption (Pass-2 only) lands in Commit 5. ws.wflgbumped viaclear_flag.ws.nelincremented bynvpiv.
Reference: faer amd.rs:236-366 (incl. inline GC at 289-338).