Skip to main content

flip

Function flip 

Source
pub const fn flip(i: i64) -> i64
Expand description

“Negation about -1”: marks an otherwise-non-negative index as “flipped” (BTF uses this for unmatched columns; KLU’s lpivot uses it to encode a row’s earlier diagonal preference once that row has been claimed by a different column). flip(flip(j)) == j for all j, and flip(EMPTY) == EMPTY. Matches klu_internal.h:78’s FLIP / amd_internal.h:72’s FLIP / btf.h’s BTF_FLIP exactly (all three upstream definitions are identical: -(j)-2).