Add Potts model example.
Change interface of sw.