hsloot / rmo

An R package for Marshall--Olkin distributions and copulas.
https://hsloot.github.io/rmo/
GNU General Public License v3.0
5 stars 2 forks source link

[REFACTOR] Don't use extended signature for `valueOf` #75

Closed hsloot closed 3 years ago

hsloot commented 3 years ago

Summary

At the moment, the valueOf-function uses signatures c("BernsteinFunction", "numeric", "integer"). This leads to impractical consequences. E.g. the third argument must be an actual integer and not and integerish double. Also for some applications a complex argument might be appropriate and for some Bernstein functions, the implementation might be able to process complex input.

Proposal

Only dispatch on first argument and argument check the rest.