Test if a point is contained inside the union of polyhedra in the same dimension.
[isin, inwhich, closest] = contains(U, x, fastbreak)
[isin, inwhich, closest] = U.contains(x)
[isin, inwhich, closest] = U.contains(x, fastbreak)
U |
Single PolyUnion object that holds sets polyhedra in the same dimension. Class: PolyUnion |
x |
A point in the same dimension as the union. Class: double |
fastbreak |
Do a quick stop in the consecutive search when x is contained in the first polyhedron it founds. Class: logical Allowed values:
Default: false |
isin |
True if ![]() Class: logical Allowed values:
|
inwhich |
Indices of sets that contain ![]() Class: double |
closest |
If the point is not contained inside the union, this output indicates the index of the set that is the closest to the point x.
Note: since this computation is expensive, do not ask for the third output unless you really need it.
Class: double |
for i=1:5, P(i) = ExamplePoly.randVrep('d',3)+rand(3,1); endCreate an union of these sets without specifying any properties.
U = PolyUnion(P);Check if the point
x = [1; -1; 0];
[isin, inwhich, closest] = U.contains(x)
isin = 0 inwhich = Empty matrix: 1-by-0 closest = 5
◀ | minus | add | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch
© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk