Hi folks, I believe the following is a bug in the implementation of incidence_matrix() in the module sage/graphs/generic_graph.py. Say I define an undirected graph as follows:
[mv...@sage sage-4.3.3]$ ./sage ---------------------------------------------------------------------- | Sage Version 4.3.3, Release Date: 2010-02-21 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: G = Graph({1: [4], 2: [4], 3: [4], 4: [1, 2, 3]}) sage: G.is_directed() False By definition of incidence matrix (see [1,2] or a text on graph theory), the following incidence matrix for G should not have -1 in any entries at all. sage: G.incidence_matrix() [-1 0 0] [ 0 -1 0] [ 0 0 -1] [ 1 1 1] Can someone confirm this? [1] http://en.wikipedia.org/wiki/Incidence_matrix [2] http://mathworld.wolfram.com/IncidenceMatrix.html -- Regards Minh Van Nguyen -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org