dcat_rcpp function

Categorical density function