On Thu, Feb 25, 2010 at 7:24 AM, Minh Nguyen <nguyenmi...@gmail.com> wrote:
> Hi Martin,
>
> On Thu, Feb 25, 2010 at 6:45 AM, Martin Rubey
> <martin.ru...@math.uni-hannover.de> wrote:
>
> <SNIP>
>
>> At least from one point of view it makes sense to make such a choice:
>> when you do, the incidence matrix times it's transpose gives you the
>> Laplace matrix of the graph.
>
> I was confused by the interface name incidence_matrix(). For an
> undirected graph object G, I would expect G.incidence_matrix() to
> return the unoriented incidence matrix of G. Imagine my surprise when
> the result was actually an oriented incidence matrix.
>
>
>> Thus if you indeed change this behaviour, it may make sense to add a
>> method that imposes an arbitrary ordering.
>
> For discussion purposes, let me toss out some ideas on improving the
> interface for computing incidence matrices. For a graph object G, I
> propose we add a keyword to G.incidence_matrix() so that the interface
> is now changed to the following method signature:
>
> def G.incidence_matrix(orientation=False)
>
> The keyword "orientation" takes on a Boolean value. So
> G.incidence_matrix(orientation=False) or G.incidence_matrix() returns
> the unoriented incidence matrix of an undirected graph G. Furthermore,
> G.incidence_matrix(orientation=True) returns the oriented incidence
> matrix of an undirected graph G, which is the current behaviour. The
> keyword "orientation" has no effect if G is a digraph. So
> "orientation" is only meant to affect undirected graphs.
>
> Let's consider whether or not to leave the method incidence_matrix()
> in the module generic_graph.py. I consider it more appropriate for
> graph.py (a module for undirected graphs) to deal with incidence
> matrices for undirected graphs. Similarly, digraph.py can deal with
> incidence matrices for digraphs. At the moment, incidence_matrix()
> resides in generic_graph.py, a module with over 10 thousand lines.
>
> I would like to open a ticket to implement the above proposal or any
> good proposal that comes up with regard to improving
> incidence_matrix().
>
> Thoughts?


This seems reasonable to me. I will act as a referee but would prefer to
have at least one other (Rob Beezer?).


>
> --
> 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
>

-- 
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

Reply via email to