timescalecalculus python library documentation

From timescalewiki
Revision as of 03:12, 19 December 2016 by Tom (talk | contribs)
Jump to: navigation, search

This is the documentation for the Python repository timescalecalculus.

The basics

After extracting the files, open a Python instance in its folder and type

 >>> from timescalecalculus import *

Defining a time scale

Right now, a time scale can consist of only a finite list of numbers. Fraction types are available.

>>> ts=[1,2,3,4,5,6,7]

The forward jump $\sigma$ can be used:

>>> sigma(3,ts)

The backward jump $\rho$ can be used:

>>> rho(3,ts)

The delta derivative works as expected. The delta derivative of a constant is zero:

>>> dderivative(lambda x: 1,5,ts)

and obeying the delta derivative of squaring function, we see

>>> dderivative(lambda x: x*x,5,ts)

The delta exponential is supported. For example if $\mathbb{T}=\{1,2,3,4,5,6,7\}$ then $e_1(3,1)=(1+\mu(1))(1+\mu(2))=(2)(2)=4$ which is correctly computed:

>>> dexpf(lambda x: 1, 3, 1, ts)