Home | Trees | Indices | Help |
---|
|
Affine functions that support basic mathematical operations (addition, etc.). Such functions can for instance be used for representing the local (linear) behavior of any function. This class is mostly meant to be used internally. This class can also be used to represent constants. The variables of affine scalar functions are Variable objects. AffineScalarFunc objects include facilities for calculating the 'error' on the function, from the uncertainties on its variables. Main attributes and methods: - nominal_value, std_dev(): value at the origin / nominal value, and standard deviation. - error_components(): error_components()[x] is the error due to Variable x. - derivatives: derivatives[x] is the (value of the) derivative with respect to Variable x. This attribute is a dictionary whose keys are the Variable objects on which the function depends. All the Variable objects on which the function depends are in 'derivatives'. - std_score(x): position of number x with respect to the nominal value, in units of the standard deviation.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
nominal_value Nominal value of the random number. |
|||
_nominal_value | |||
derivatives | |||
Inherited from |
|
nominal_value -- value of the function at the origin. nominal_value must not depend in any way of the Variable objects in 'derivatives' (the value at the origin of the function being defined is a constant). derivatives -- maps each Variable object on which the function being defined depends to the value of the derivative with respect to that variable, taken at the nominal value of all variables. Warning: the above constraint is not checked, and the user is responsible for complying with it.
|
Individual components of the standard deviation of the affine function (in absolute value), returned as a dictionary with Variable objects as keys. This method assumes that the derivatives contained in the object take scalar values (and are not a tuple, like what math.frexp() returns, for instance). |
Standard deviation of the affine function. This method assumes that the function returns scalar results. This returned standard deviation depends on the current standard deviations [std_dev()] of the variables (Variable objects) involved. |
Uses the to_string() conversion function on both the nominal value and the standard deviation, and returns a string that describes them. to_string() is typically repr() or str(). |
repr(x)
|
str(x)
|
Returns 'value' - nominal value, in units of the standard deviation. Raises a ValueError exception if the standard deviation is zero. |
Hook for the standard copy module. The returned AffineScalarFunc is a completely fresh copy, which is fully independent of any variable defined so far. New variables are specially created for the returned AffineScalarFunc object. |
Version of __abs__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__abs__() <==> abs(x) |
Version of __add__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__add__(y) <==> x+y |
Version of __div__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__div__(y) <==> x/y |
Version of __floordiv__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__floordiv__(y) <==> x//y |
Version of __mod__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__mod__(y) <==> x%y |
Version of __mul__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__mul__(y) <==> x*y |
Version of __neg__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__neg__() <==> -x |
Version of __pos__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__pos__() <==> +x |
Version of __pow__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__pow__(y[, z]) <==> pow(x, y[, z]) |
Version of __radd__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__radd__(y) <==> y+x |
Version of __rdiv__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__rdiv__(y) <==> y/x |
Version of __rfloordiv__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__rfloordiv__(y) <==> y//x |
Version of __rmod__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__rmod__(y) <==> y%x |
Version of __rmul__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__rmul__(y) <==> y*x |
Version of __rpow__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: y.__rpow__(x[, z]) <==> pow(x, y[, z]) |
Version of __rsub__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__rsub__(y) <==> y-x |
Version of __rtruediv__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__rtruediv__(y) <==> y/x |
Version of __sub__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__sub__(y) <==> x-y |
Version of __truediv__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: x.__truediv__(y) <==> x/y |
Version of __trunc__(...) that returns an affine approximation (AffineScalarFunc object), if its result depends on variables (Variable objects). Otherwise, returns a simple constant (when applied to constant arguments). Warning: arguments of the function that are not AffineScalarFunc objects must not depend on uncertainties.Variable objects in any way. Otherwise, the dependence of the result in uncertainties.Variable objects will be incorrect. Original documentation: Return the Integral closest to x between 0 and x. |
|
nominal_valueNominal value of the random number.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Nov 7 18:01:57 2016 | http://epydoc.sourceforge.net |