FIND REGION
Finds the polytope containing a given point
Contents
Method of pwag object.
Description
This method search 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 indexes of all the corresponding polytopes. If the binary search tree is available, the search can be performed by exploring it (faster).
Syntax
reg = findRegon(object,x)
Retrieves the indexes of the polytopes containing points x. reg is an array of n_points elements, containing the indexes of the polytopes in which the n_points points defined in x are contained. x must be a matrix of size or . 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 binary search tree (if available). If mode is not provided, it is set to 'normal'.
NOTE: If object is an array of pwag objects, only the first element is considered.
Acknowledgements
Contributors:
- Alberto Oliveri (alberto.oliveri@unige.it)
Copyright is with:
- Copyright (C) 2011 University of Genoa, Italy.