private RealDistribution resolveDistribution(DistributionType d){
    switch(d){
	  case BETA:        return bettafishd;
	                    
	  case NORMAL:      return normald;
		                
	  case CAUCHY:      return cauchyd;
		                
	  case CHISQUARED:  return chid;
		                
	  case EXPONENTIAL: return exponentiald;
		                
	  case F:           return fd;
		                
	  case GAMMA:       return gammad;
		                
	  case LOGNORMAL:   return lognormald;
		                
	  default:          return null;
	}
  }