C++ rational-grid set operations
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
intersection_assign(y) shall replace X by X∩Y exactly. Empty shall be absorbing, universe neutral and self intersection idempotent. The operand shall retain its mathematical value. Unequal ambient dimensions shall throw std::invalid_argument before receiver mutation, including empty operands.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
Congruence conjunction computes the meet of rational grids.
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void intersection_assign(const Grid& y);
Use rational CRT intersections and invertible coordinate transformations, including inconsistent offsets, lines, points, self operands, cache histories and dimension errors.
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/intersection1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
upper_bound_assign(y) shall replace X by the least rational grid containing X∪Y. Empty shall be neutral and self hull idempotent. For nonempty X = p + HX and Y = q + HY, the result shall be p + HX + HY + Z(q − p). It need not equal the finite union. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.
A self join shall preserve the stored descriptions. If the operands have the same ordered generator rows in current generator systems or the same ordered congruence rows in current congruence systems, the join shall keep the existing caches without appending rows or materializing another system.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
Joining supporting points adds an integer displacement rather than a real line.
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void upper_bound_assign(const Grid& y);
Compute hulls from rational displacement groups and independent generators, including fractional phases, redundant descriptions, self hull, empty and dimension errors. Check stored descriptions before and after self joins and joins with copies without first forcing a normalization.
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
upper_bound_assign_if_exact(y) shall return true exactly when X∪Y is a rational grid. On true it shall assign that exact union. On false it shall preserve the receiver's mathematical value; its caches may change. Empty and contained operands shall succeed. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
A hull is an exact union for containment or a compatible two-coset decomposition, but arbitrary unions require disjunctions.
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
bool upper_bound_assign_if_exact(const Grid& y);
Check containment, adjacent index-two cosets, incompatible direction groups, continuous/point cases, false-result preservation, self operands and dimensions against independent union criteria.
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000424 Abstract set-difference semantics (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
difference_assign(y) shall assign the least rational grid containing X⧵Y. Removing a superset shall yield empty; removing disjoint or empty shall preserve X. When the difference is the other coset of an index-two subgroup, that coset shall be retained exactly. In other cases the least grid may be the whole entry receiver. The operand shall retain its value. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
Grid difference must distinguish a single remaining coset from a complement whose grid hull is unchanged.
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void difference_assign(const Grid& y);
Use exact subgroup-index and phase calculations, index-two complements, partial overlap, continuous and singleton factors, coupled coordinates, empty/self operands and dimension errors. Check exact integer-grid complement cosets, disjoint cosets, equality cuts and singleton factors in different dimensions, both representations and pending or minimized caches. After operand destruction, verify the result, invariants, independent copies and self difference.
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/griddifference1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000426 Context-preserving simplification (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
simplify_using_context_assign(y) shall produce X’ satisfying X’∩Y = X∩Y. A false return shall imply X∩Y = ⌀; true need not prove nonemptiness. Simplification may enlarge the receiver and need not be maximal or preserve it outside the context. The operand's mathematical value shall be preserved unless it is the receiver itself. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
Only behavior within the context is observable to context-based simplification clients.
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
bool simplify_using_context_assign(const Grid& y);
Compare intersections before and after simplification for coupled rational cosets, equality/continuous factors, empty contexts, self context and multiple caches; check false-return soundness and dimensions.
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/simplifyusingcontext1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Specifies)
unconstrain(var) and unconstrain(vars) shall existentially project the selected coordinates and reintroduce them as unconstrained real coordinates at their original indices. They shall preserve ambient dimension and all correlations among unselected coordinates. Empty remains empty; an empty selection is identity. Any selected index outside the ambient dimension shall throw std::invalid_argument before mutation, including empty receivers.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
Forgetting coordinates removes all their restrictions, rather than merely deleting visibly involving rows.
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void unconstrain(Variable var); void unconstrain(const Variables_Set& vars);
Compare with independent generator projection plus real coordinate lines, including correlated congruences, all/empty selections, zero dimensions and invalid indices.
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/unconstrain1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.