FIND REGION

Finds the polytope containing a given point.

Contents

Method of the pwar object.

Description

This method searches for all polytopes in the domain partition until it finds the polytope containing a given point. Then it returns the index of that polytope. If the input points are several, the method returns the indices of all the corresponding polytopes. If an orthogonal search tree is available, the search can be performed by exploring it (which is faster).

Syntax

reg = findRegion(object,x)

Retrieves the indices of the polytopes containing points x. reg is an [1*npoints] vector containing the indices of the polytopes in which each point defined in x is contained. x must be a matrix of size [ndim*npoints] or [npoints*ndim]. If the polytope corresponding to a point is not found, the corresponding entry in array reg will be '0'.

reg = findRegion(object,x,mode)

As above, but it is possible to specify a mode for the search. If mode is set to 'normal' all regions are scanned until the desired one is found; if mode is 'tree', the region is located by exploring the orthogonal search tree (if available). If mode is not provided, it is set to 'tree' if the tree is available, else it is set to 'normal'.

Acknowledgements

Contributors:

Copyright is with: