PolyhedralSets[ZPolyhedralSets]
SamplePoint
return a sample point of a ZPolyhedralSet
Calling Sequence
Parameters
Description
Examples
References
Compatibility
SamplePoint(zpoly)
zpoly
-
ZPolyhedralSet
SamplePoint(zpoly) returns a sample point of zpoly. If zpoly is empty, then an error is raised.
with⁡PolyhedralSets:
with⁡ZPolyhedralSets:
Create a Z-polyhedron in 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.
SamplePoint⁡zp
z=10,x=9,y=7
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:-SamplePoint 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[IsIntegerPointOf]
ZPolyhedralSets[IntegerPointDecomposition]
ZPolyhedralSets[EnumerateIntegerPoints]
ZPolyhedralSets
PolyhedralSets
Download Help Document