PolyhedralSets[ZPolyhedralSets]
IsIntegerPointOf
check whether a point is in a ZPolyhedralSet
Calling Sequence
Parameters
Description
Examples
References
Compatibility
IsIntegerPointOf(zpoly,v)
zpoly
-
ZPolyhedralSet
v
an integer point in Vector form
IsIntegerPointOf(zpoly,v) returns true if v is a point of zpoly, false otherwise.
Note that the coordinates of v must be integer numbers.
with⁡PolyhedralSets:
with⁡ZPolyhedralSets:
Create a Z-polyhedron in the three-dimensional space
ineqs≔0≤−16+2⁢y+z,0≤−72+4⁢x+4⁢y+3⁢z,0≤2⁢y−z,0≤−24+4⁢x+4⁢y−3⁢z,0≤−4⁢x+4⁢y+3⁢z,0≤48−4⁢x+4⁢y−3⁢z,0≤48−4⁢x−4⁢y+3⁢z,0≤8−2⁢y+z,0≤−24+4⁢x−4⁢y+3⁢z,0≤24−2⁢y−z,0≤24+4⁢x−4⁢y−3⁢z,0≤96−4⁢x−4⁢y−3⁢z
L≔Lattice⁡Matrix⁡1,0,2,0,−1,1,0,0,2,Vector⁡0,0,1
L≔Lattice⁡1020−11002,001
vars≔z,x,y
zp≔ZPolyhedralSet⁡ineqs,vars,lattice=L
zp≔Relations:0≤2⁢y−z0≤−16+2⁢y+z0≤8−2⁢y+z0≤24−2⁢y−z0≤−4⁢x+4⁢y+3⁢z0≤−72+4⁢x+4⁢y+3⁢z0≤−24+4⁢x−4⁢y+3⁢z0≤−24+4⁢x+4⁢y−3⁢z0≤24+4⁢x−4⁢y−3⁢z0≤48−4⁢x−4⁢y+3⁢z0≤48−4⁢x+4⁢y−3⁢z0≤96−4⁢x−4⁢y−3⁢zVariables:z,x,yParameters:ParameterConstraints:Lattice:ZSpan1020−11002,,,001
Get a sample point from zp
Point_from_pzp≔SamplePoint⁡zp
Point_from_pzp≔z=10,x=9,y=7
Turn it into Vector form
vect≔Vector⁡seq⁡rhs⁡pt,pt=Point_from_pzp
vect≔1097
Check that it indeed belongs to zp
IsIntegerPointOf⁡zp,vect
true
Pick a random integer point
vect≔Vector⁡0,0,0
vect≔000
Check whether it belongs to zp
false
Double-check that latter answer by enumerating the points of zp
EnumerateIntegerPoints⁡zp
x=9,y=5,z=6,x=9,y=7,z=6,x=8,y=5,z=7,x=9,y=5,z=7,x=10,y=5,z=7,x=8,y=7,z=7,x=9,y=7,z=7,x=10,y=7,z=7,x=7,y=5,z=8,x=8,y=5,z=8,x=9,y=5,z=8,x=10,y=5,z=8,x=11,y=5,z=8,x=7,y=7,z=8,x=8,y=7,z=8,x=9,y=7,z=8,x=10,y=7,z=8,x=11,y=7,z=8,x=8,y=5,z=9,x=9,y=5,z=9,x=10,y=5,z=9,x=8,y=7,z=9,x=9,y=7,z=9,x=10,y=7,z=9,x=9,y=5,z=10,x=9,y=7,z=10
Rachid Seghir, Vincent Loechner, and Benoı̂t Meister. "Integer affine transformations of parametric Z-polytopes and applications to loop nest optimization." Proceedings of TACO, Vol. 9(2):8:1–8:27, 2012.
Rui-Juan Jing and Marc Moreno Maza. "Computing the Integer Points of a Polyhedron, I: Algorithm." Proceedings of CASC 2017: 225-241, Springer.
Rui-Juan Jing and Marc Moreno Maza. "Computing the Integer Points of a Polyhedron, II: Complexity Estimates." Proceedings of CASC 2017: 242-256, Springer.
The PolyhedralSets:-ZPolyhedralSets:-IsIntegerPointOf command was introduced in Maple 2023.
For more information on Maple 2023 changes, see Updates in Maple 2023.
See Also
ZPolyhedralSets:-IsEmpty
ZPolyhedralSets:-IsContained
ZPolyhedralSets:-SamplePoint
ZPolyhedralSets:-IntegerPointDecomposition
ZPolyhedralSets:-EnumerateIntegerPoints
ZPolyhedralSets:-ZPolyhedralSet
ZPolyhedralSets
PolyhedralSets
Download Help Document