relentless.model.GeometricMean#
- class relentless.model.GeometricMean(a, b)#
Geometric mean of two values.
The geometric mean \(v\) of two values \(a\) and \(b\) is:
\[v = \sqrt{a b}\]This variable may be useful for implementing mixing rules.
Methods
compute(a, b)Implementation of the value.
compute_derivative(param, a, b)Implementation of the derivative.
derivative(var)Calculate derivative with respect to a
Variable.Attributes
countnamesNames of parameters
Value of the variable.
- compute(a, b)#
Implementation of the value.
This method should implement calculation of the variable from the parameter keywords. The parameters will be passed as keyword arguments.
- compute_derivative(param, a, b)#
Implementation of the derivative.
This method should implement the partial derivative with respect to the named dependency
paramgiven the current value of this variable. The parameters will be passed as keyword arguments.- Parameters:
param (str) – Name of the dependency.
- derivative(var)#
Calculate derivative with respect to a
Variable.The derivative is evaluated using the
VariableGraph. Any values of the graph that are needed will be updated.
- property value#
Value of the variable.
The variable will be evaluated using the
VariableGraphif it needs to be recomputed.- Type: