17#ifndef __math_betainc_h__
18#define __math_betainc_h__
20#ifdef MRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS
21#include <unsupported/Eigen/SpecialFunctions>
35#ifdef MRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS
39 template <
typename ArgADerived,
typename ArgBDerived,
typename ArgXDerived>
40 inline const Eigen::Array<typename ArgXDerived::Scalar, Eigen::Dynamic, Eigen::Dynamic>
41 betaincreg (
const Eigen::ArrayBase<ArgADerived>& a,
const Eigen::ArrayBase<ArgBDerived>& b,
const Eigen::ArrayBase<ArgXDerived>& x)
43 Eigen::Array<typename ArgXDerived::Scalar, Eigen::Dynamic, Eigen::Dynamic> ones (x);
44 ones.fill (
typename ArgXDerived::Scalar (1));
45 return (Eigen::betainc (a, b, x) / Eigen::betainc (a, b, ones)).eval();
default_type betaincreg(const default_type a, const default_type b, const default_type x)
double default_type
the default type used throughout MRtrix