mode function for Dirichlet distribution