Hello! I posted this on sage-support, but I should have posted it
here.

I tried using the HasseDiagram and rank features of Sage as described
on http://www.sagemath.org/doc/reference/sage/combinat/posets/hasse_diagram.html

Things worked ok, but when I then tried:
m= Matrix([[0,1,1],[0,0,1],[0,0,0]])
g = DiGraph(m)
h2 = HasseDiagram(g)
h2.rank(2)

I got the message:

Traceback (click to the left of this block for traceback)
...
TypeError: 'NoneType' object is not callable

Clicking to the left of the block gives:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_11.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding:
utf-8 -*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("aDIucmFuaygyKQ=="),glob
als())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
  File "/tmp/tmp_tnVLn/___code___.py", line 3, in <module>
    exec compile(u'h2.rank(_sage_const_2 )
  File "", line 1, in <module>
  File "/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-
packages/sage/com binat/posets/hasse_diagram.py", line 567, in rank
    return self.rank_function()(element)
TypeError: 'NoneType' object is not callable

Please tell me what this means and how I can get rank working
properly.

Also, I have a complaint about HasseDiagram, in that for the matrix
above, it draws a link from 0 to 1, from 1 to 2, and from 0 to 2. In
the usual definition of a Hasse diagram, the link from 0 to 2
shouldn't show, since 0 > 1 > 2. (I'm referring to the nodes;
obviously the previous inequalities are nonsense numerically.) (For
example, see http://mathworld.wolfram.com/HasseDiagram.html and
http://mathworld.wolfram.com/CoverRelation.html.) In other words, 0
does not cover 2 because 1 is an intermediate node between 0 and 2.

Someone suggested adding "format='adjacency_matrix') to the DiGraph
command, but that doesn't change anything.

Thanks in advance for any help you can give!

*****************************************************
Raymond N. Greenwell         mat...@hofstra.edu
Professor of Mathematics     (516) 463-5573
103 Hofstra University
Hempstead, NY 11549-1030
http://people.hofstra.edu/rgreenwell

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to