17 const float maxDelta) {
19 if (current.
size() != previous.
size()) {
24 current.
v + (current.
v - previous.
v).cwiseMin(maxDelta).cwiseMax(-maxDelta) * factor;
34 const float maxDelta) {
36 if (current.
size() != previous.
size()) {
42 const auto sz = current.
size();
44 for (Eigen::Index i = 0; i < sz; ++i) {
45 if (activeParams.test(i)) {
46 result(i) = current(i) + factor * std::clamp(current(i) - previous(i), -maxDelta, maxDelta);
ModelParametersT< float > ModelParameters
std::bitset< kMaxModelParams > ParameterSet
Bitset for model parameter enablement.
ModelParameters extrapolateModelParameters(const ModelParameters &previous, const ModelParameters ¤t, const float factor, const float maxDelta)
Extrapolates model parameters by first clamping the difference between current and previous parameter...
Profiling macros that dispatch to one of three backends, selected at compile time:
#define MT_PROFILE_FUNCTION()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto size() const