diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-22 22:34:41 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-22 22:34:41 +0200 |
commit | 316f3650a469a5e487790df142f59dcf1efac609 (patch) | |
tree | b6f4884917d3bac51e8b302c4c8f8cf6d04e4a64 /pyspike/function.py | |
parent | 11f05d9dac3711d89db37a043db3d9437958c6f3 (diff) |
docs for interval averaging, fixed doc typos
Diffstat (limited to 'pyspike/function.py')
-rw-r--r-- | pyspike/function.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pyspike/function.py b/pyspike/function.py index e340096..d53042f 100644 --- a/pyspike/function.py +++ b/pyspike/function.py @@ -42,7 +42,7 @@ class PieceWiseConstFunc(object): """ Checks if the function is equal to another function up to `decimal` precision. - :param: other: another :class:`PieceWiseConstFunc` + :param other: another :class:`PieceWiseConstFunc` :returns: True if the two functions are equal up to `decimal` decimals, False otherwise :rtype: bool @@ -78,8 +78,12 @@ class PieceWiseConstFunc(object): """ Computes the average of the piece-wise const function: :math:`a = 1/T int_0^T f(x) dx` where T is the length of the interval. + :param interval: averaging interval given as a pair of floats, if None + the average over the whole function is computed. + :type interval: Pair of floats or None. :returns: the average a. :rtype: double + """ if interval is None: # no interval given, average over the whole spike train @@ -160,7 +164,7 @@ class PieceWiseLinFunc: def copy(self): """ Returns a copy of itself - :rtype: :class`PieceWiseLinFunc` + :rtype: :class:`PieceWiseLinFunc` """ return PieceWiseLinFunc(self.x, self.y1, self.y2) @@ -168,7 +172,7 @@ class PieceWiseLinFunc: """ Checks if the function is equal to another function up to `decimal` precision. - :param: other: another :class:`PieceWiseLinFunc` + :param other: another :class:`PieceWiseLinFunc` :returns: True if the two functions are equal up to `decimal` decimals, False otherwise :rtype: bool @@ -203,8 +207,12 @@ class PieceWiseLinFunc: """ Computes the average of the piece-wise linear function: :math:`a = 1/T int_0^T f(x) dx` where T is the length of the interval. + :param interval: averaging interval given as a pair of floats, if None + the average over the whole function is computed. + :type interval: Pair of floats or None. :returns: the average a. :rtype: double + """ def intermediate_value(x0, x1, y0, y1, x): |