le

Purpose

Test if a union of polyhedra is contained inside another union.

Syntax

U1 <= U2

Description

Check if the union of polyhedra U1 is a non-strict subset of the union U2. The result it the logical statement if U1 <= U2 and false otherwise.

Input Arguments

U1

Union of polyhedra in the same dimension.

Class: PolyUnion

U2

Union of polyhedra in the same dimension.

Class: PolyUnion

Output Arguments

tf

True if U1 <= U2 and false otherwise.

Class: logical

Allowed values:

  • true
  • false

Example(s)

Example 1

Consider a rectangle in 2D.
 rectangle = Polyhedron('lb',[-2;-1],'ub',[4;5]); 
 Cut the the rectangle into pieces by extracting an inner part. 
 T = rectangle \ (0.2*rectangle); 
 Create an union of these pieces. 
 U1 = PolyUnion('Set',T,'FullDim',true,'Connected',true,'Convex',false,'Overlaps',false,'Bounded',true); 

 U1.plot 

../../../../../../fig/mpt/modules/geometry/unions/@PolyUnion/le_img_1.png

The union U1 is contained inside the rectangle, so we verify that this statement is true.
 U2 = PolyUnion(rectangle); 

 U1 <= U2 
ans =

     1

The inner rectangle is not contained inside the union.
 U3 = PolyUnion(0.2*rectangle); 

 U1 <= U3 
ans =

     0

See Also

ge


© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk