_matrix_
member function for an object that can be
coerced to a matrix over a ring matrix
will work for this object.
The following is from SAGE_ROOT/devel/sage/sage/graphs/graph.py
class SimpleGraph(GenericGraph): ... def _matrix_(self, R): return self.am() def am(self): """ Shorter call for adjacency matrix makes life easier. """ return self.adjacency_matrix()
See About this document... for information on suggesting changes.