Package PyDSTool :: Module Points :: Class Pointset
[hide private]
[frames] | no frames]

Class Pointset

source code

object --+    
         |    
     Point --+
             |
            Pointset

1D parameterized or non-parameterized set of discrete points. (If present, the independent variable must be a float64 or an int32)

Instance Methods [hide private]
 
__init__(self, kwd=None, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__delitem__(self, k)
Remove point by index or by coordinate.
source code
 
remove(self, ix)
Remove individual Point by its index.
source code
 
reverse(self)
Reverse order of points *IN PLACE*.
source code
 
rename(self, coord, newcoord)
Rename a coordinate.
source code
 
makeIxMaps(self) source code
 
addlabel(self, ix, label, info=None)
Add string label to indexed point.
source code
 
removelabel(self, ix)
Remove all labels at indexed point.
source code
 
bylabel(self, s)
Return pointset containing points labelled with the supplied labels.
source code
 
__setitem__(self, ix, p)
Change individual points, accessed by index (no slicing supported).
source code
 
__getitem__(self, ix) source code
 
_resolve_indepvar(self, p) source code
 
setTol(self, tol) source code
 
__call__(self, p, coords=None) source code
 
__len__(self) source code
 
__contains__(self, other) source code
 
__lt__(self, other) source code
 
__gt__(self, other) source code
 
__le__(self, other) source code
 
__ge__(self, other) source code
 
__eq__(self, other) source code
 
__ne__(self, other) source code
 
insert(self, parg, ix=None)
Insert individual Point or Pointset before the given index.
source code
 
append(self, parg, t=None, skipMatchingIndepvar=False)
Append individual Point or Pointset in place.
source code
 
extend(self, parg, t=None, skipMatchingIndepvar=False)
Append individual Point or Pointset in place.
source code
 
toarray(self, include_indepvar=False)
Convert the pointset to a D x L array (one variable per row), where D is the dimension of the pointset and L is its length.
source code
 
todict(self, aslist=False)
Convert Pointset to a dictionary of arrays (or of lists with aslist=True).
source code
 
_infostr(self, verbose=0) source code
 
__repr__(self)
str(x)
source code
 
__str__(self)
str(x)
source code
 
info(self, verboselevel=1) source code
 
__copy__(self) source code
 
copy(self) source code
 
__getstate__(self) source code
 
__setstate__(self, state) source code
 
_match_indepvararray(self, other)
Verifies the matching of independent variable arrays in two pointsets.
source code
 
__add__(self, other) source code
 
__radd__(self, other) source code
 
__sub__(self, other) source code
 
__rsub__(self, other) source code
 
__mul__(self, other) source code
 
__rmul__(self, other) source code
 
__div__(self, other) source code
 
__rdiv__(self, other) source code
 
find(self, indepval, end=None)
find returns an integer index for where to place a point having independent variable value <indepval> in the Pointset, if <indepval> already exists.
source code
 
findIndex(self, indepval, end=None)
find returns an integer index for where to place a point having independent variable value <indepval> in the Pointset, if <indepval> already exists.
source code

Inherited from Point: __abs__, __neg__, __pos__, __pow__, __rtruediv__, __truediv__, get, has_key, items, iteritems, iterkeys, itervalues, keys, mapNames, update, values

Inherited from Point (private): _force_coords_to_ixlist, _map_names_to_ixs

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, kwd=None, **kw)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

__delitem__(self, k)
(Index deletion operator)

source code 

Remove point by index or by coordinate.

Overrides: Point.__delitem__

makeIxMaps(self)

source code 
Overrides: Point.makeIxMaps

addlabel(self, ix, label, info=None)

source code 

Add string label to indexed point. info dictionary is optional

Overrides: Point.addlabel

removelabel(self, ix)

source code 

Remove all labels at indexed point.

Overrides: Point.removelabel

bylabel(self, s)

source code 

Return pointset containing points labelled with the supplied labels. Argument s can be a string or a list of strings.

__setitem__(self, ix, p)
(Index assignment operator)

source code 

Change individual points, accessed by index (no slicing supported). Individual coordinate values of a point can be changed by adding a cross-reference coordinate name or index. If ix is a variable name then the entire row can be changed (again, no slicing supported).

Overrides: Point.__setitem__

__getitem__(self, ix)
(Indexing operator)

source code 
Overrides: Point.__call__

__call__(self, p, coords=None)
(Call operator)

source code 
Overrides: Point.__call__

__len__(self)
(Length operator)

source code 
Overrides: Point.__len__

__contains__(self, other)
(In operator)

source code 
Overrides: Point.__contains__

__lt__(self, other)
(Less-than operator)

source code 
Overrides: Point.__lt__

__gt__(self, other)
(Greater-than operator)

source code 
Overrides: Point.__gt__

__le__(self, other)
(Less-than-or-equals operator)

source code 
Overrides: Point.__le__

__ge__(self, other)
(Greater-than-or-equals operator)

source code 
Overrides: Point.__ge__

__eq__(self, other)
(Equality operator)

source code 
Overrides: Point.__eq__

__ne__(self, other)

source code 
Overrides: Point.__ne__

insert(self, parg, ix=None)

source code 

Insert individual Point or Pointset before the given index.

If ix is not given then the source and target Pointsets must be parameterized. In this case the Point or Pointset will be inserted according to the ordering of independent variable values.

append(self, parg, t=None, skipMatchingIndepvar=False)

source code 

Append individual Point or Pointset in place.

skipMatchingIndepvar option causes a matching independent variable value at the beginning of p to be skipped (only meaningful for appending parameterized Pointsets). This option is mainly for internal use.

extend(self, parg, t=None, skipMatchingIndepvar=False)

source code 

Append individual Point or Pointset in place.

skipMatchingIndepvar option causes a matching independent variable value at the beginning of p to be skipped (only meaningful for appending parameterized Pointsets). This option is mainly for internal use.

toarray(self, include_indepvar=False)

source code 

Convert the pointset to a D x L array (one variable per row), where D is the dimension of the pointset and L is its length. (This is a copy of the internal attribute 'coordarray'.)

If the optional include_indepvar switch is set True (default False), the first row is the independent variable, and the whole array will be (D+1) x L in shape.

Overrides: Point.toarray

todict(self, aslist=False)

source code 

Convert Pointset to a dictionary of arrays (or of lists with aslist=True).

Overrides: Point.todict

_infostr(self, verbose=0)

source code 
Overrides: Point._infostr

__repr__(self)
(Representation operator)

source code 

str(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

info(self, verboselevel=1)

source code 
Overrides: Point.info

__copy__(self)

source code 
Overrides: Point.__copy__

copy(self)

source code 
Overrides: Point.__copy__

__getstate__(self)

source code 
Overrides: Point.__getstate__

__setstate__(self, state)

source code 
Overrides: Point.__setstate__

_match_indepvararray(self, other)

source code 

Verifies the matching of independent variable arrays in two pointsets. Does nothing if either object is not a parameterized pointset.

__add__(self, other)
(Addition operator)

source code 
Overrides: Point.__add__

__radd__(self, other)
(Right-side addition operator)

source code 
Overrides: Point.__add__

__sub__(self, other)
(Subtraction operator)

source code 
Overrides: Point.__sub__

__rsub__(self, other)

source code 
Overrides: Point.__rsub__

__mul__(self, other)

source code 
Overrides: Point.__mul__

__rmul__(self, other)

source code 
Overrides: Point.__mul__

__div__(self, other)

source code 
Overrides: Point.__div__

__rdiv__(self, other)

source code 
Overrides: Point.__rdiv__

find(self, indepval, end=None)

source code 

find returns an integer index for where to place a point having independent variable value <indepval> in the Pointset, if <indepval> already exists. Otherwise, a pair indicating the nearest independent variable values present in the Pointset is returned.

To ensure an integer is always returned, choose a left or right side to choose from the pair, using end=0 or 1 respectively.

findIndex(self, indepval, end=None)

source code 

find returns an integer index for where to place a point having independent variable value <indepval> in the Pointset, if <indepval> already exists. Otherwise, a pair indicating the nearest independent variable values present in the Pointset is returned.

To ensure an integer is always returned, choose a left or right side to choose from the pair, using end=0 or 1 respectively.