IsContained - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


PolyhedralSets[ZPolyhedralSets]

  

IsContained

  

check whether each integer point of a bounded ZPolyhedralSet is contained in one ZPolyehdralSet from a list

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

IsContained(zpoly,list)

Parameters

zpoly

-

ZPolyhedralSet object representing a bounded Z-polyhedral set.

list

-

list of ZPolyhedralSets

Description

• 

The IsContained command returns true if every integer point of zpoly is contained in one of the ZPolyhedralSet of the list list, and otherwise it returns false.

• 

If zpoly is not bounded, an error is raised.

Examples

> 

with⁡PolyhedralSets:

> 

with⁡ZPolyhedralSets:

Create a Z-polyhedron in three-dimensional space.

> 

ineqs≔3⁢x−2⁢y+z≤7,−2⁢x+2⁢y−z≤12,−4⁢x+y+3⁢z≤15,−y≤−25

ineqs≔3⁢x−2⁢y+z≤7,−2⁢x+2⁢y−z≤12,−4⁢x+y+3⁢z≤15,−y≤−25

(1)
> 

vars≔x,y,z:

> 

zp≔ZPolyhedralSet⁡ineqs,vars

zp≔Relations:−y≤−25−4⁢x+y+3⁢z≤15−2⁢x+2⁢y−z≤123⁢x−2⁢y+z≤7Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan100010001,,,000

(2)

Apply IntegerPointDecomposition to zp.

> 

theset≔IntegerPointDecomposition⁡zp

theset≔Relations:z≤17−y≤−25−z≤−2−5⁢y+13⁢z≤672⁢y−z≤48−4⁢x+y+3⁢z≤15−2⁢x+2⁢y−z≤123⁢x−2⁢y+z≤7Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan100010001,,,000,Relations:x=15y=27z=16Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan7135,,,−6−121,Relations:x=14y=25z=15Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan7135,,,−7−140,Relations:x=18y=33z=18Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan7135,,,−3−63,Relations:x=19y=z2+25z≤18−z≤0Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan012,,,19250

(3)

Create two other Z-polyhedra in three-dimensional space.

> 

ineqs1≔x=19,y=z2+25,−z≤0,z≤18

ineqs1≔x=19,y=z2+25,−z≤0,z≤18

(4)
> 

ineqs2≔x=18,y=z2+25,−z≤0,z≤18

ineqs2≔x=18,y=z2+25,−z≤0,z≤18

(5)
> 

zp1≔ZPolyhedralSet⁡ineqs1,vars

zp1≔Relations:x=19y=z2+25z≤18−z≤0Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan100010001,,,000

(6)
> 

zp2≔ZPolyhedralSet⁡ineqs2,vars

zp2≔Relations:x=18y=z2+25z≤18−z≤0Variables:x,y,zParameters:ParameterConstraints:Lattice:ZSpan100010001,,,000

(7)

Check whether each integer point of zp1 is a point of zp.

> 

IsContained⁡zp1,theset

true

(8)

Check whether each integer point of zp2 is a point of zp.

> 

IsContained⁡zp2,theset

false

(9)

Double-check the above inclusion tests by using EnumerateIntegerPoints.

> 

EnumerateIntegerPoints⁡zp

x=19,y=25,z=0,x=18,y=25,z=2,x=19,y=26,z=2,x=18,y=25,z=3,x=17,y=25,z=4,x=18,y=26,z=4,x=19,y=27,z=4,x=17,y=25,z=5,x=18,y=26,z=5,x=16,y=25,z=6,x=17,y=25,z=6,x=17,y=26,z=6,x=18,y=27,z=6,x=19,y=28,z=6,x=16,y=25,z=7,x=17,y=26,z=7,x=18,y=27,z=7,x=15,y=25,z=8,x=16,y=25,z=8,x=16,y=26,z=8,x=17,y=26,z=8,x=17,y=27,z=8,x=18,y=28,z=8,x=19,y=29,z=8,x=15,y=25,z=9,x=16,y=25,z=9,x=16,y=26,z=9,x=17,y=27,z=9,x=18,y=28,z=9,x=14,y=25,z=10,x=15,y=25,z=10,x=15,y=26,z=10,x=16,y=26,z=10,x=16,y=27,z=10,x=17,y=27,z=10,x=17,y=28,z=10,x=18,y=29,z=10,x=19,y=30,z=10,x=14,y=25,z=11,x=15,y=25,z=11,x=15,y=26,z=11,x=16,y=26,z=11,x=16,y=27,z=11,x=17,y=28,z=11,x=18,y=29,z=11,x=13,y=25,z=12,x=14,y=25,z=12,x=15,y=25,z=12,x=14,y=26,z=12,x=15,y=26,z=12,x=15,y=27,z=12,x=16,y=27,z=12,x=16,y=28,z=12,x=17,y=28,z=12,x=17,y=29,z=12,x=18,y=30,z=12,x=19,y=31,z=12,x=13,y=25,z=13,x=14,y=25,z=13,x=14,y=26,z=13,x=15,y=26,z=13,x=15,y=27,z=13,x=16,y=27,z=13,x=16,y=28,z=13,x=17,y=29,z=13,x=18,y=30,z=13,x=13,y=25,z=14,x=14,y=25,z=14,x=14,y=26,z=14,x=15,y=26,z=14,x=14,y=27,z=14,x=15,y=27,z=14,x=15,y=28,z=14,x=16,y=28,z=14,x=16,y=29,z=14,x=17,y=29,z=14,x=17,y=30,z=14,x=18,y=31,z=14,x=19,y=32,z=14,x=14,y=25,z=15,x=14,y=26,z=15,x=15,y=27,z=15,x=15,y=28,z=15,x=16,y=28,z=15,x=16,y=29,z=15,x=17,y=30,z=15,x=18,y=31,z=15,x=15,y=27,z=16,x=16,y=29,z=16,x=16,y=30,z=16,x=17,y=30,z=16,x=17,y=31,z=16,x=18,y=32,z=16,x=19,y=33,z=16,x=17,y=31,z=17,x=18,y=32,z=17,x=18,y=33,z=18,x=19,y=34,z=18

(10)
> 

EnumerateIntegerPoints⁡zp1

x=19,y=25,z=0,x=19,y=26,z=2,x=19,y=27,z=4,x=19,y=28,z=6,x=19,y=29,z=8,x=19,y=30,z=10,x=19,y=31,z=12,x=19,y=32,z=14,x=19,y=33,z=16,x=19,y=34,z=18

(11)
> 

EnumerateIntegerPoints⁡zp2

x=18,y=25,z=0,x=18,y=26,z=2,x=18,y=27,z=4,x=18,y=28,z=6,x=18,y=29,z=8,x=18,y=30,z=10,x=18,y=31,z=12,x=18,y=32,z=14,x=18,y=33,z=16,x=18,y=34,z=18

(12)

References

  

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.

Compatibility

• 

The PolyhedralSets:-ZPolyhedralSets:-IsContained command was introduced in Maple 2023.

• 

For more information on Maple 2023 changes, see Updates in Maple 2023.

See Also

ZPolyhedralSets:-IsEmpty

ZPolyhedralSets:-IsIntegerPointOf

ZPolyhedralSets:-SamplePoint

ZPolyhedralSets:-IntegerPointDecomposition

ZPolyhedralSets:-EnumerateIntegerPoints

ZPolyhedralSets:-ZPolyhedralSet

ZPolyhedralSets

PolyhedralSets