Source code for spynnaker.pyNN.utilities.random_stats.abstract_random_stats

# Copyright (c) 2015 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from spinn_utilities.abstract_base import AbstractBase, abstractmethod


class AbstractRandomStats(object, metaclass=AbstractBase):
    """
    Statistics about PyNN `~spynnaker.pyNN.RandomDistribution` objects.
    """
    __slots__ = ()

[docs] @abstractmethod def cdf(self, dist, v): """ Return the cumulative distribution function value for the value `v`. """
[docs] @abstractmethod def ppf(self, dist, p): """ Return the percent point function value for the probability `p`. """
[docs] @abstractmethod def mean(self, dist): """ Return the mean of the distribution. """
[docs] @abstractmethod def std(self, dist): """ Return the standard deviation of the distribution. """
[docs] @abstractmethod def var(self, dist): """ Return the variance of the distribution. """
[docs] @abstractmethod def high(self, distribution): """ Return the high cut-off value of the distribution, or `None` if the distribution is unbounded. """
[docs] @abstractmethod def low(self, distribution): """ Return the low cut-off value of the distribution, or `None` if the distribution is unbounded. """