pure functiondensity_hxi