sbmltoodejax.jaxfuncs

sbmltoodejax.jaxfuncs#

sbmltoodejax.jaxfuncs.cot(x)[source]#

Cotangent function \(cot(x) = \frac{1}{\tan(x)}\)

sbmltoodejax.jaxfuncs.coth(x)[source]#

Hyperbolic cotangent function \(csch(x) = \frac{1}{\tanh(x)}\)

sbmltoodejax.jaxfuncs.csc(x)[source]#

Cosecant function \(csc(x) = \frac{1}{\sin(x)}\)

sbmltoodejax.jaxfuncs.csch(x)[source]#

Hyperbolic cosecant function \(csch(x) = \frac{1}{\sinh(x)}\)

sbmltoodejax.jaxfuncs.piecewise(*args)[source]#

This function implements the Piecewise function used in SBML models: Piecewise(expression1, condition1 [, expression2, condition2 [,...]])

Parameters:
  • expressionN (float) – a numerical value

  • conditionN (bool) – a boolean value

Returns:

The first expression passed as argument with a True condition, read left to right. If all conditions are false, will return 0.

Return type:

float

Note

This function is not intended to be used by a user, but is defined in a way that matches how libSBML formats piecewise functions are used in SBML models. This is similar to jax.numpy.piecewise function but instead of evaluating inputs inside the function, they are evaluated before being passed to the function.

Examples

For example, if called like so piecewise(x + 2, x < 3, x + 4, x > 3) and if x = 2, then the arguments will be evaluated to piecewise(4, True, 6, False) and returns 4.

sbmltoodejax.jaxfuncs.sec(x)[source]#

Secant function \(sec(x) = \frac{1}{\cos(x)}\)

sbmltoodejax.jaxfuncs.sech(x)[source]#

Hyperbolic secant function \(sech(x) = \frac{1}{\cosh(x)}\)

sbmltoodejax.jaxfuncs.sigmoid(x)[source]#

Sigmoid function \(sigmoid(x) = \frac{1}{1+\exp(-x)}\)