Kmeans: Between class intertia
Total variance = within-class variance + between-class variance.

i.e. if you compute the total variance once, you can get the between class inertia simply by

between-class variance = total variance - within-class variance