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

Class base_n_counter

source code

object --+
         |
        base_n_counter

Simple counter in base-n, using d digits.
Resets to zeros when state (n-1, n-1, ..., n-1) is
incremented.

base_n_counter(n, d)

Public attribute:
    counter

Implements methods:
    inc            -- increment counter (returns nothing)
    __getitem__    -- return ith component of counter
    reset          -- set counter to (0, 0, ..., 0)

Instance Methods [hide private]
 
__init__(self, n, d)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
inc(self) source code
 
__getitem__(self, i) source code
 
reset(self) source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
str(x)
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, n, d)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

str(x)

Overrides: object.__repr__
(inherited documentation)