Package PyDSTool :: Package Toolbox :: Module phaseplane :: Class distance_to_pointset
[hide private]
[frames] | no frames]

Class distance_to_pointset

source code

object --+
         |
        distance_to_pointset

First and second maximum and/or minimum distances of a point q
to a set of points, returning a dictionary keyed by 'min' and
'max' to dictionaries keyed by integers 1 and 2 (respectively).
The values of this dictionary are dictionaries of
  'd' -> distance
  'pos' -> index into pts

To restrict the search to a lower-dimensional subspace, specify a sub-set
of the variables in q. Defaults to Euclidean distance (normord=2),otherwise
specify metric-defining norm order.

To speed up the search, use n > 1 to create n segments of the pointset,
from which representative points will first be assessed, before the search
narrows to a particular segment. Be sure to use a large enough n given
the variation in each segment (which will otherwise cause spurious results
for certain test points). Default n=30.
[NB This option currently only returns the first max/min distances]

The radius option provides an opportunity to use information from
a previous call. This works for minimum distances only, and forces
the same segment to be searched, provided that the new point is
within the radius of the previous point (using 2-norm unless a 2D
Point is specified). CURRENTLY, THIS DOES NOT WORK WELL. KEEP IT
SWITCHED OFF USING (default) radius=0.

If gen is not None, it should contain a generator for use with isochron-related
events, for more accurate computations. The remaining arguments are associated
with this usage.

Instance Methods [hide private]
 
__init__(self, pts, n=30, radius=0, gen=None, iso_ev=None, other_evnames=None, pars_to_vars=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
clear_history(self) source code
 
__call__(self, q, use_norm=False, normord=2, minmax=['min', 'max']) source code
 
_distance(self, q, use_norm, normord, minmax) source code
 
search_both(self, q, pts, fn, le, ge, dmin, dmin_old, dmax, dmax_old) source code
 
search_min(self, q, pts, fn, le, dmin, dmin_old) source code
 
search_max(self, q, pts, fn, ge, dmax, dmax_old) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  _keys = ['d', 'pos']
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pts, n=30, radius=0, gen=None, iso_ev=None, other_evnames=None, pars_to_vars=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)