The Graph and DiGraph classes provide simple graphs which allow self-loops. The default Graph and DiGraph are weighted graphs with edge weight equal to 1 but arbitrary edge data can be assigned.
The MultiGraph and MultiDiGraph classes extend the basic graphs by allowing multiple (parallel) edges between nodes.
The LabeledGraph and LabeledDiGraph classes extend the basic graphs by allowing arbitrary label data to be assigned to nodes.