Mining and ranking of generalized multi-dimensional frequent subgraphs