Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
function betarnd(a,b)result(ans)real(8)::a,b,ans,u,vif((a<=0d0).or.(b<=0d0))then write(*,*)"BETARND: Beta parameters must be positive"end if! ## There are more efficient methods for generating beta samples.! ## However such methods are a little more efficient and much more complicated.! ## For an explanation of why the following method works, see! ## http://www.johndcook.com/distribution_chart.html#gamma_betau=gammarnd(a,1d0)v=gammarnd(b,1d0)ans=u/(u+v)end function betarnd