reduceHMM <-
function(hmm,G){
  
#   reOrder = unlist(G)
# 
#   setHMM(transitionMatrix=reduceTpm(hmm@transitionMatrix,G)[reOrder,reOrder],
#          mu=hmm@stateParameters$mu[,reOrder],
#          sigma=hmm@stateParameters$sigma[,,reOrder])
  

  setHMM(transitionMatrix=reduceTpm(hmm@transitionMatrix,G),
         mu=hmm@stateParameters$mu,
         sigma=hmm@stateParameters$sigma)
  
}
