eq

Purpose

Returns true if the set covered by unions of polyhedra U_1 is the same as the set covered by union U_2 and false otherwise.

Syntax

ts = U1.eq(U2)
ts = U1 == U2

Description

Returns true if the union of polyhedra in the same dimension U1 covers the same space as the union U2 which is in the same dimension. The result is a logical statement if ../../../../../../fig/mpt/modules/geometry/unions/@PolyUnion/eq3.png holds true or not. The polyunion U1 can be an array, whereas U2 is restricted to be a single polyunion object.

Input Arguments

U1

Union of polyhedra in the same dimension.

Class: PolyUnion

U2

Union of polyhedra in the same dimension as U1.

Class: PolyUnion

Output Arguments

ts

True if U1 == U2 and false otherwise.

Class: logical

Allowed values:

  • true
  • false

Example(s)

Example 1

Create union of two polyhedra in the same dimension
P(1) = ExamplePoly.randHrep;

P(2) = ExamplePoly.randHrep('ne',1);

 U1 = PolyUnion('Set',P,'Bounded',false) 
PolyUnion in the dimension 2 with 2 polyhedra.
Properties of the union: 
  Bounded: 0
Functions : none
Create a copy of this polyunion
 U2 = U1.copy
PolyUnion in the dimension 2 with 2 polyhedra.
Properties of the union: 
  Bounded: 0
Functions : none
Obviously, the polyunions cover the same space. We can verify that using equality test:
U1 == U2
ans =

     1

See Also

copy, join


© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch