# Revision history [back]

Try ?Graph and/or ?DiGraph to get the documentation and examples of these "constructors".

The following dialog with the sage interpreter was leading to a directed graph D and an undirected one, G.

sage: M = matrix(6,6)
sage: for j,k in [(1,2),(2,3),(3,4),(3,5),(2,5),(5,6)]:
....:     M[j-1,k-1] = 1
....:
sage: M
[0 1 0 0 0 0]
[0 0 1 0 1 0]
[0 0 0 1 1 0]
[0 0 0 0 0 0]
[0 0 0 0 0 1]
[0 0 0 0 0 0]