Home > mpt > @polytope > reduceunion.m

reduceunion

PURPOSE ^

REDUCEUNION Removes redundant elements from a polytope array

SYNOPSIS ^

function [Pret,keep] = reduceunion(P,Options)

DESCRIPTION ^

 REDUCEUNION Removes redundant elements from a polytope array

 [Pret,kept] = reduceunion(P,Options),

 ---------------------------------------------------------------------------
 DESCRIPTION
 ---------------------------------------------------------------------------
 given a (possibly non-convex) union of polytopes P, removes
 all elements of P which are completely covered by the other regions

 i.e. assume we have 3 polytopes:
      p1 = polytope([0 -1; -1 0; 0 1; 1 0],[1;0;1;1])
      p2 = polytope([0 -1; -1 0; 0 1; 1 0],[1;1;1;0])
      p3 = polytope([0 -1; -1 0; 0 1; 1 0],[1;1;1;1])

 then if Pu=[p1 p2 p3], this function removes polytopes p1 and p2, since they are completely
 covered by a larger polytope (p3 in this case)
 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
   P           -   polytope array
   Options     -   will be used when calling regiondiff

 ---------------------------------------------------------------------------
 OUTPUT
 ---------------------------------------------------------------------------

  Pret    -  reduced polytope array
  kept    -  0/1 vector of length(P) which stores a 0 at index i if polytope
             P(i) is redundant and 1 at index i if P(i) is not redundant.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003