namespace
SushiDSP::models
- Declared in
include/SushiDSP/circuits/models/SoftTransition.hpp
Functions
void softplus_and_logistic(double t, double &softplus_value, double &logistic_value)Evaluates softplus and its derivative together from one exponential.
softplus() and logistic() each cost one exp(); a caller that needs both — which every device model's joint current-and-Jacobian entry point does — would otherwise pay for two. The branches are the same overflow guards the two single-value helpers carried.
Parameters
tArgument in the units of the caller's transition scale.
softplus_valueReceives ln(1 + exp(t)).
logistic_valueReceives 1 / (1 + exp(-t)).
double softplus(double t)Softplus ln(1 + exp(t)), the smooth C-infinity replacement for max(0, t).
Parameters
tArgument in the units of the caller's transition scale.
Returns
ln(1 + exp(t)), computed without overflow for large positive t.
double logistic(double t)Logistic 1 / (1 + exp(-t)), which is the derivative of softplus().
Parameters
tArgument in the units of the caller's transition scale.
Returns
1 / (1 + exp(-t)) in [0, 1], computed without overflow for either sign of t.

