Package Scientific :: Package Functions :: Module FirstDerivatives :: Class DerivVar
[frames] | no frames]

Class DerivVar

Numerical variable with automatic derivatives of first order

Instance Methods
 
__abs__(self)
 
__add__(self, other)
 
__cmp__(self, other)
 
__coerce__(self, other)
 
__div__(self, other)
list
__getitem__(self, order)
Returns: a list of all derivatives of the given order
 
__init__(self, value, index=0, order=1)
 
__mul__(self, other)
 
__neg__(self)
 
__nonzero__(self)
 
__pos__(self)
 
__pow__(self, other, z=None)
 
__radd__(self, other)
 
__rdiv__(self, other)
 
__repr__(self)
 
__rmul__(self, other)
 
__rpow__(self, other)
 
__rsub__(self, other)
 
__str__(self)
 
__sub__(self, other)
 
arccos(self)
 
arcsin(self)
 
arctan(self)
 
arctan2(self, other)
 
cos(self)
 
cosh(self)
 
exp(self)
 
gamma(self)
 
log(self)
 
log10(self)
 
sign(self)
 
sin(self)
 
sinh(self)
 
sqrt(self)
 
tan(self)
 
tanh(self)
Method Details

__getitem__(self, order)
(Indexing operator)

 
Parameters:
  • order (int) - derivative order
Returns: list
a list of all derivatives of the given order
Raises:
  • ValueError - if order < 0 or order > 1

__init__(self, value, index=0, order=1)
(Constructor)

 
Parameters:
  • value (number) - the numerical value of the variable
  • index (int) - the variable index, which serves to distinguish between variables and as an index for the derivative lists. Each explicitly created instance of DerivVar must have a unique index.
  • order (int) - the derivative order, must be zero or one
Raises:
  • ValueError - if order < 0 or order > 1