Added class to detect if a matrix is dispersed or not