tpm_g2 function

Build all transition probability matrices of an inhomogeneous HMM