Package jline.api.pfqn.nc
Class Pas_placement
java.lang.Object
jline.api.pfqn.nc.Pas_placement
Placement-order logic of a pass-and-swap (Pinvalid input: '&S') / order-independent network
with swap graph H. Isolates the check that decides which class orderings are
feasible (adhere to the placement partial order) for
Pfqn_pas_is.
An ordering c = (c_1, ..., c_ell) is feasible iff it is non-decreasing with respect to H, i.e. class a never appears before class b whenever H(b,a) != 0 (Comte and Dorsman, 2021, arXiv:2009.12299). Equivalently H(b,a) != 0 means b must be placed before a. The transitive closure of "must precede" yields the precedence matrix P(i,j) = 1 iff class i must be placed before class j, so an ordering is feasible iff every class is placed only after all its P-predecessors. H may be a mere Hasse diagram; the closure makes it explicit.
Port of matlab/src/api/pfqn/pas_placement.m.
-
Method Summary
-
Method Details
-
closure
public static int[][] closure(int[][] H) Transitive closure of the "must precede" relation. Input H is the direct relation (H[i][j] != 0 iff i precedes j); the result P[i][j] = 1 iff i precedes j through any chain. Returns null for an empty/null H. -
placeable
public static int[] placeable(int[] x, int[][] P) Class j is placeable next iff it is present (x[j] > 0) and no still-present class i must precede it: sum_i x[i] * P[i][j] == 0. Returns the placeable class indices. A null P means no constraints (pure OI): every present class.
-