generalized graph class