Home > mpt > @polytope > dointersect.m

dointersect

PURPOSE ^

DOINTERSECT Checks if two polytopes / polyarrays intersect

SYNOPSIS ^

function [answer, IA, IB, IAB] = dointersect(P1,P2)

DESCRIPTION ^

DOINTERSECT Checks if two polytopes / polyarrays intersect

 [answer, IA, IB, IAB] = dointersect(P1,P2)

 ---------------------------------------------------------------------------
 DESCRIPTION
 ---------------------------------------------------------------------------
 Returns true (1) if input polytopes / polyarrays intersect.

 This function does not return the intersection!


 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
 P1,P2   - Polytopes or polyarrays

 ---------------------------------------------------------------------------
 OUTPUT                                                                                                    
 ---------------------------------------------------------------------------
 answer  - 1 if polytopes / polyarrays intersect, 0 otherwise
 IA, IB  - index vectors such that P1(IA) & P2(IB) = intersect(P1, P2)
 IAB     - indeces of intersecting polytopes stored as a n x 2 matrix, where
           every row gives indeces of intersecting polytopes. returned as an
           empty matrix if no intersections exist. Example:
             IAB = [1 1; 2 1; 3 1] means that there exists a full-dimensional
             intersection of (P1(1) and P2(1)), (P1(2) and (P2(1)) and (P1(3)
             and (P2(1)).

 see also AND, INTERSECT

CROSS-REFERENCE INFORMATION ^

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