search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``igraph`.`statistics`.`RunningMean``

class documentation

`class RunningMean: (source)`

Constructor: `RunningMean(items, n, mean, sd)`

View In Hierarchy

Running mean calculator.

This class can be used to calculate the mean of elements from a list, tuple, iterable or any other data source. The mean is calculated on the fly without explicitly summing the values, so it can be used for data sets with arbitrary item count. Also capable of returning the standard deviation (also calculated on the fly)

Method | `__complex__` | Undocumented
Method | `__float__` | Undocumented
Method | `__init__` | RunningMean(items=None, n=0.0, mean=0.0, sd=0.0)
Method | `__int__` | Undocumented
Method | `__len__` | Undocumented
Method | `__repr__` | Undocumented
Method | `__str__` | Undocumented
Method | `add` | RunningMean.add(value, repeat=1)
Method | `add_many` | RunningMean.add(values)
Method | `clear` | Resets the running mean calculator.
Property | `mean` | Returns the current mean
Property | `result` | Returns the current mean and standard deviation as a tuple
Property | `sd` | Returns the current standard deviation
Property | `var` | Returns the current variation
Instance Variable | `_mean` | Undocumented
Instance Variable | `_nitems` | Undocumented
Instance Variable | `_sd` | Undocumented
Instance Variable | `_sqdiff` | Undocumented

def __complex__(self): (source)

Undocumented

def __float__(self): (source)

Undocumented

def __init__(self, items=None, n=0.0, mean=0.0, sd=0.0): (source)

RunningMean(items=None, n=0.0, mean=0.0, sd=0.0)

Initializes the running mean calculator.

There are two possible ways to initialize the calculator. First, one can provide an iterable of items; alternatively, one can specify the number of items, the mean and the standard deviation if we want to continue an interrupted calculation.

Parameters
items | the items that are used to initialize the running mean calcuator. If `items` is given, `n`, `mean` and `sd` must be zeros.
n | the initial number of elements already processed. If this is given, `items` must be `None`.
mean | the initial mean. If this is given, `items` must be `None`.
sd | the initial standard deviation. If this is given, `items` must be `None`.

def __int__(self): (source)

Undocumented

def __len__(self): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def __str__(self): (source)

Undocumented

def add(self, value, repeat=1): (source)

RunningMean.add(value, repeat=1)

Adds the given value to the elements from which we calculate the mean and the standard deviation.

Parameters
value | the element to be added
repeat | number of repeated additions

def add_many(self, values): (source)

RunningMean.add(values)

Adds the values in the given iterable to the elements from which we calculate the mean. Can also accept a single number. The left shift (`<<`) operator is aliased to this function, so you can use it to add elements as well:

    >>> rm=RunningMean()
    >>> rm << [1,2,3,4]
    >>> rm.result               # doctest:+ELLIPSIS
    (2.5, 1.290994...)

Parameters
values:iterable | the element(s) to be added

def clear(self): (source)

Resets the running mean calculator.

@property
mean = (source)

Returns the current mean

@property
result = (source)

Returns the current mean and standard deviation as a tuple

@property
sd = (source)

Returns the current standard deviation

@property
var = (source)

Returns the current variation

_mean = (source)

Undocumented

_nitems = (source)

Undocumented

_sd = (source)

Undocumented

_sqdiff = (source)

Undocumented