entropy functions