improve documentation of betafunction.{hpp,cpp}