Initial implementation of fisher_f degrees of freedom finder#1407
Initial implementation of fisher_f degrees of freedom finder#1407JacobHass8 wants to merge 4 commits into
Conversation
|
Hmmm, I'm not sure why this is failing on some of the platforms. The error message is ../../../boost/math/distributions/fisher_f.hpp: In static member function ‘static RealType boost::math::fisher_f_distribution<RealType, Policy>::find_v1(RealType, RealType, RealType)’:
../../../boost/math/distributions/fisher_f.hpp:58:34: error: ‘find_degrees_of_freedom_f’ is not a member of ‘boost::math::detail’
58 | eval_type result = detail::find_degrees_of_freedom_f(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../boost/math/distributions/fisher_f.hpp: In static member function ‘static RealType boost::math::fisher_f_distribution<RealType, Policy>::find_v1(const boost::math::complemented3_type<A, B, C>&)’:
../../../boost/math/distributions/fisher_f.hpp:81:34: error: ‘find_degrees_of_freedom_f’ is not a member of ‘boost::math::detail’
81 | eval_type result = detail::find_degrees_of_freedom_f(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../boost/math/distributions/fisher_f.hpp: In static member function ‘static RealType boost::math::fisher_f_distribution<RealType, Policy>::find_v2(RealType, RealType, RealType)’:
../../../boost/math/distributions/fisher_f.hpp:103:34: error: ‘find_degrees_of_freedom_f’ is not a member of ‘boost::math::detail’
103 | eval_type result = detail::find_degrees_of_freedom_f(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../boost/math/distributions/fisher_f.hpp: In static member function ‘static RealType boost::math::fisher_f_distribution<RealType, Policy>::find_v2(const boost::math::complemented3_type<A, B, C>&)’:
../../../boost/math/distributions/fisher_f.hpp:126:34: error: ‘find_degrees_of_freedom_f’ is not a member of ‘boost::math::detail’
126 | eval_type result = detail::find_degrees_of_freedom_f(
| ^~~~~~~~~~~~~~~~~~~~~~~~~but |
|
I suspect you've created a cyclic include - a really bad thing and all kinds of badness can ensue! If I'm right and the non-central-f depends on the regular f (which I suspect it should), then either moving the common code into fisher_f.hpp or a common shared header of it's own would do it. |
Hmmm, unfortunately I think I'm going to have to duplicate the code. I need the fisher and non-central fisher distributions to be able to access the function but both distributions need to used to create the function. Even putting it in a separate file would require cyclic including. |
This is a simple copy and paste from the previous PR . I still need to implement a couple of tests. One set of tests to check if the function works as intended and the other to see if we properly catch the case when there are multiple degrees of freedom.
As noted above, most of this is copy and pasted from the
non_central_fdistribution implementation of these same functions. I wonder if it would be more concise to program a special case of thenon_central_ffunctions whennc=0. Whennc=0we can just use thefisher_fdistribution? Now that I type it out, I think I might go with that.Closes #1305.