#14654: implement flow polytopes
-------------------------------------+-------------------------------------
       Reporter:  ahmorales          |        Owner:  graphcomponentowner
           Type:  enhancement        |       Status:  needs_review
       Priority:  minor              |    Milestone:  sage-wishlist
      Component:  graph theory       |   Resolution:
       Keywords:  flow polytopes,    |    Merged in:
  kostant partition function, sage   |    Reviewers:
  days 47.5                          |  Work issues:
        Authors:  ahmorales          |       Commit:
Report Upstream:  N/A                |  a1fa21827894719e987b1ac3e41527e92df43f68
         Branch:  u/chapoton/14654   |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Yo !

 > Yes, but is there a way to just import the function as a method
 `polytopes.flow_polytope` ?

 There is, but it may be a bit awkard for in one version the function takes
 a graph as an argument, and in the other `polytopes.flow_polytope(G)` it
 needs to be provided explicitly... But maybe that is not a problem.

 About importing the method:

 {{{
 sage: class A:
 ....:     def hey(self):
 ....:         print self
 sage: A.hey(1)
 ...
 TypeError: unbound method hey() must be called with A instance as first
 argument (got Integer instance instead)
 sage: A.hey.__func__(1)
 1
 }}}

 But I am afraid that it does not preserve the docstring...

 On the other hand it is possible to take a 'normal' function and make a
 copy of it inside of a class. You have many functions like that at the end
 of `graphs/graph.py`

 > Well, for quiver guys like me, a source is a vertex with only outgoing
 edges, and a sink with only incoming edge. Maybe you give them other
 names. So there is no need to provide them as arguments. Of course one
 needs to have as many sources as sinks for the flow polytope to make
 sense. Every source gets an input of 1 and every sink an output of 1.

 Oh I see `O_o`

 Well, for graph guys like me we expect the sources to be explicitly given,
 like in `GenericGraph.flow`.

 HMmmm... Well, if you are positive that this is the standard that people
 who call this method would expect, could you make it a bit clearer for the
 graph guys ? Something like:

 {{{
 ... and there is a unit of flow entering the sources (i.e. vertices of
 indegree 0) and leaving the sinks (i.e. vertices of outdegree 0)
 }}}

 The point is that I would understand if you talk about "the sinks/sources
 of a graph", but in the context of flow problem we expect the
 sources/sinks to be specific vertices. Could you also add a sentence about
 the necessity to have as many sinks as sources ?

 Thaaaaaaanks and sorry for that ! Different people, different standards
 `^^;`

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/14654#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to