Behaviour of the anisotropy of electronic and vibrational polarizability in different classes of compounds