polygamma API; SpecialFunctions into separate module?
@ggael
Submitted by Gael GuennebaudAssigned to Nobody
Link to original bugzilla bug (#1232)
Version: 3.3 (current stable)
Description
polygamma computes the n-th derivative of the digamma (psi) function evaluated at position x. In all tools I checked, the parameter orders are as follows:
polygamma(n,x)
(both n and x are arrays)
The first parameter is sometimes optional (n=0).
It is thus natural to follow the same convention for the free function:
Eigen::polygamma(n,x)
but for the method based API, it feels odd to write:
(1) n.polygamma(x)
I'd rather inverse the parameter to write:
(2) x.polygamma(n);
but the first version is already implemented and used in Tensor.
So currently, while fixing polygamma in Core (it was defined as a unary operator), I disabled the method-based API, and kept only the free function. Perhaps, we can keep it as is, and also remove the other ambiguous method-based binary operators that have been introduced in 3.3, like zeta.
What do you think?