On the inertia of weighted (k - 1)-cyclic graphs