  Let ${\cal M}_{t,v,r}(n,m)$, $2\leq m<n$, be the collection of self-affine
carpets with expanding matrix $\diag(n,m)$ which are totally disconnected,
possessing vacant rows and with uniform horizontal fibers. In this paper, we
introduce a notion of structure tree of a metric space, and thanks to this new
notion, we completely characterize when two carpets in ${\cal M}_{t,v,r}(n,m)$
are Lipschitz equivalent.
