cgSpan: Closed Graph-Based Substructure Pattern Mining