+#if USE_LOGISTIC_DISTRIBUTION
+ // df/dA(x_i)
+ matA[i + 0 * curve.size()] = sech2(l_const * (x-mu)/sigma);
+
+ // df/dµ(x_i)
+ matA[i + 1 * curve.size()] = 2.0 * l_const * A * matA[i + 0 * curve.size()]
+ * tanh(l_const * (x-mu)/sigma) / sigma;
+
+ // df/dσ(x_i)
+ matA[i + 2 * curve.size()] =
+ matA[i + 1 * curve.size()] * (x-mu)/sigma;
+#else