A class for graph functions